Authored by zhaoqi

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

@@ -127,7 +127,7 @@ public class HttpUriContants { @@ -127,7 +127,7 @@ public class HttpUriContants {
127 public static final String TASK__SAVE = "/taskConfigure/saveTaskModel"; 127 public static final String TASK__SAVE = "/taskConfigure/saveTaskModel";
128 public static final String TASK__DELETE = "/taskConfigure/delTaskModel"; 128 public static final String TASK__DELETE = "/taskConfigure/delTaskModel";
129 public static final String TASK__GET_ID = "/taskConfigure/getTaskModelById"; 129 public static final String TASK__GET_ID = "/taskConfigure/getTaskModelById";
130 - public static final String GET_DEGRADE_FUNCTION = "/degrade/getFunction"; 130 + public static final String GET_DEGRADE_FUNCTION = "/degrade/getInitInfo";
131 public static final String GET_DEGRADE_INFO = "/degrade/getList"; 131 public static final String GET_DEGRADE_INFO = "/degrade/getList";
132 public static final String EDIT_DEGRADE_INFO = "/degrade/change"; 132 public static final String EDIT_DEGRADE_INFO = "/degrade/change";
133 133
@@ -23,4 +23,12 @@ public class DegradeInfoReq extends PageRequest { @@ -23,4 +23,12 @@ public class DegradeInfoReq extends PageRequest {
23 private String configDesc; 23 private String configDesc;
24 24
25 private String functionPointName; 25 private String functionPointName;
  26 +
  27 + private String level1Page;
  28 +
  29 + private String level2Page;
  30 +
  31 + private String apiName;
  32 +
  33 + private String clientType;
26 } 34 }
@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping; @@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
11 import org.springframework.web.bind.annotation.ResponseBody; 11 import org.springframework.web.bind.annotation.ResponseBody;
12 import org.springframework.web.servlet.ModelAndView; 12 import org.springframework.web.servlet.ModelAndView;
13 13
  14 +import java.util.HashMap;
  15 +
14 /** 16 /**
15 * Created by zhaoqi on 2016/8/29 0029. 17 * Created by zhaoqi on 2016/8/29 0029.
16 */ 18 */
@@ -24,7 +26,9 @@ public class DegradeInfoCtrl { @@ -24,7 +26,9 @@ public class DegradeInfoCtrl {
24 @RequestMapping("/info") 26 @RequestMapping("/info")
25 public ModelAndView toDegradeList(Model model) { 27 public ModelAndView toDegradeList(Model model) {
26 BaseResponse degradeFunction = httpClient.defaultPost(HttpUriContants.GET_DEGRADE_FUNCTION,null,BaseResponse.class); 28 BaseResponse degradeFunction = httpClient.defaultPost(HttpUriContants.GET_DEGRADE_FUNCTION,null,BaseResponse.class);
27 - model.addAttribute("functionPoints",degradeFunction.getData()); 29 + model.addAttribute("functionPoints",((HashMap)degradeFunction.getData()).get("function"));
  30 + model.addAttribute("level1Pages",((HashMap)degradeFunction.getData()).get("level1"));
  31 + model.addAttribute("level2Pages",((HashMap)degradeFunction.getData()).get("level2"));
28 return new ModelAndView("degrade/degradeList"); 32 return new ModelAndView("degrade/degradeList");
29 } 33 }
30 34
@@ -57,19 +57,19 @@ @@ -57,19 +57,19 @@
57 <mvc:resources location="/fonts/" mapping="/fonts/**"/> 57 <mvc:resources location="/fonts/" mapping="/fonts/**"/>
58 <mvc:resources location="/script/" mapping="/script/**"/> 58 <mvc:resources location="/script/" mapping="/script/**"/>
59 59
60 - <mvc:interceptors>  
61 - <!-- 登录验证 -->  
62 - <mvc:interceptor>  
63 - <mvc:mapping path="/**"/>  
64 - <mvc:exclude-mapping path="/hystrix/**"/>  
65 - <mvc:exclude-mapping path="/user/**"/>  
66 - <mvc:exclude-mapping path="/img/**"/>  
67 - <mvc:exclude-mapping path="/css/**"/>  
68 - <mvc:exclude-mapping path="/js/**"/>  
69 - <mvc:exclude-mapping path="/fonts/**"/>  
70 - <mvc:exclude-mapping path="/script/**"/>  
71 - <bean class="com.ui.interceptor.AuthInterceptor"/>  
72 - </mvc:interceptor>  
73 - </mvc:interceptors> 60 + <!--<mvc:interceptors>-->
  61 + <!--&lt;!&ndash; 登录验证 &ndash;&gt;-->
  62 + <!--<mvc:interceptor>-->
  63 + <!--<mvc:mapping path="/**"/>-->
  64 + <!--<mvc:exclude-mapping path="/hystrix/**"/>-->
  65 + <!--<mvc:exclude-mapping path="/user/**"/>-->
  66 + <!--<mvc:exclude-mapping path="/img/**"/>-->
  67 + <!--<mvc:exclude-mapping path="/css/**"/>-->
  68 + <!--<mvc:exclude-mapping path="/js/**"/>-->
  69 + <!--<mvc:exclude-mapping path="/fonts/**"/>-->
  70 + <!--<mvc:exclude-mapping path="/script/**"/>-->
  71 + <!--<bean class="com.ui.interceptor.AuthInterceptor"/>-->
  72 + <!--</mvc:interceptor>-->
  73 + <!--</mvc:interceptors>-->
74 74
75 </beans> 75 </beans>
@@ -14,6 +14,21 @@ @@ -14,6 +14,21 @@
14 <input type="text" class="form-control" id="configName" name="configName" maxlength="80" size="40" readonly="readonly"/> 14 <input type="text" class="form-control" id="configName" name="configName" maxlength="80" size="40" readonly="readonly"/>
15 </div> 15 </div>
16 </div> 16 </div>
  17 +
  18 + <div class="form-group">
  19 + <label class="col-sm-2 control-label">一级页面:</label>
  20 + <div class="col-sm-8">
  21 + <input type="text" class="form-control" id="level1Page" name="level1Page" maxlength="100" size="40"/>
  22 + </div>
  23 + </div>
  24 +
  25 + <div class="form-group">
  26 + <label class="col-sm-2 control-label">二级页面:</label>
  27 + <div class="col-sm-8">
  28 + <input type="text" class="form-control" id="level2Page" name="level2Page" maxlength="200" size="40"/>
  29 + </div>
  30 + </div>
  31 +
17 <div class="form-group"> 32 <div class="form-group">
18 <label class="col-sm-2 control-label">配置名称:</label> 33 <label class="col-sm-2 control-label">配置名称:</label>
19 <div class="col-sm-8"> 34 <div class="col-sm-8">
@@ -22,15 +37,28 @@ @@ -22,15 +37,28 @@
22 </div> 37 </div>
23 38
24 <div class="form-group"> 39 <div class="form-group">
  40 + <label class="col-sm-2 control-label">接口名称:</label>
  41 + <div class="col-sm-8">
  42 + <input type="text" class="form-control" id="apiName" name="apiName" maxlength="100" size="40"/>
  43 + </div>
  44 + </div>
  45 + <div class="form-group">
25 <label class="col-sm-2 control-label">配置描述:</label> 46 <label class="col-sm-2 control-label">配置描述:</label>
26 <div class="col-sm-8"> 47 <div class="col-sm-8">
27 <input type="text" class="form-control" id="configDesc" name="configDesc" maxlength="200" size="40"/> 48 <input type="text" class="form-control" id="configDesc" name="configDesc" maxlength="200" size="40"/>
28 </div> 49 </div>
29 </div> 50 </div>
  51 +
  52 + <%--<div class="form-group">--%>
  53 + <%--<label class="col-sm-2 control-label">功能点:</label>--%>
  54 + <%--<div class="col-sm-8">--%>
  55 + <%--<input type="text" class="form-control" id="functionPointName" name="functionPointName" maxlength="80" size="40"/>--%>
  56 + <%--</div>--%>
  57 + <%--</div>--%>
30 <div class="form-group"> 58 <div class="form-group">
31 - <label class="col-sm-2 control-label">功能点:</label> 59 + <label class="col-sm-2 control-label">客户端:</label>
32 <div class="col-sm-8"> 60 <div class="col-sm-8">
33 - <input type="text" class="form-control" id="functionPointName" name="functionPointName" maxlength="80" size="40"/> 61 + <input type="text" class="form-control" id="clientType" name="clientType" maxlength="30" size="40"/>
34 </div> 62 </div>
35 </div> 63 </div>
36 <div class="form-group"> 64 <div class="form-group">
@@ -73,5 +101,9 @@ $(function(){ @@ -73,5 +101,9 @@ $(function(){
73 $("#degradeInfoForm #switchOn").val(paramObj.switchOn); 101 $("#degradeInfoForm #switchOn").val(paramObj.switchOn);
74 $("#degradeInfoForm #cloudType").val(paramObj.cloudType); 102 $("#degradeInfoForm #cloudType").val(paramObj.cloudType);
75 $("#degradeInfoForm #functionPointName").val(paramObj.functionPointName); 103 $("#degradeInfoForm #functionPointName").val(paramObj.functionPointName);
  104 + $("#degradeInfoForm #level1Page").val(paramObj.level1Page);
  105 + $("#degradeInfoForm #level2Page").val(paramObj.level2Page);
  106 + $("#degradeInfoForm #apiName").val(paramObj.apiName);
  107 + $("#degradeInfoForm #clientType").val(paramObj.clientType);
76 }) 108 })
77 </script> 109 </script>
@@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
81 81
82 </div> 82 </div>
83 <div class="widget-content nopadding"> 83 <div class="widget-content nopadding">
84 - <div class="widget-title" style="height: 53px;"> 84 + <div class="widget-title" style="height: 98px;">
85 <div> 85 <div>
86 <div class="form-inline" role="form" id="inBoxQueryDiv" 86 <div class="form-inline" role="form" id="inBoxQueryDiv"
87 style=" margin-top: 12px;margin-left: 25px;float: left;"> 87 style=" margin-top: 12px;margin-left: 25px;float: left;">
@@ -90,22 +90,24 @@ @@ -90,22 +90,24 @@
90 <select id="cloudType" name="cloudType" class="form-control"> 90 <select id="cloudType" name="cloudType" class="form-control">
91 <option value="zookeeper_aws">aws</option> 91 <option value="zookeeper_aws">aws</option>
92 <option value="zookeeper_qq">qCloud</option> 92 <option value="zookeeper_qq">qCloud</option>
  93 + <option value="gray_qq">gray</option>
93 </select> 94 </select>
94 </div> 95 </div>
95 <div class="input-group" style="float: left;"> 96 <div class="input-group" style="float: left;">
96 - <span class="input-group-addon">配置项:</span>  
97 - <input type="text" id="configName" name="configName" class="form-control" placeholder=""/>  
98 - </div>  
99 - <div class="input-group" style="float: left;">  
100 - <span class="input-group-addon">配置名称:</span>  
101 - <input type="text" id="configShowName" name="configShowName" class="form-control" placeholder=""/> 97 + <span class="input-group-addon">一级页面:</span>
  98 + <select id="level1Page" name="functionPoint" class="form-control">
  99 + <option value="">全部</option>
  100 + <c:forEach items="${level1Pages }" var="level1Page">
  101 + <option value="${level1Page }">${level1Page }</option>
  102 + </c:forEach>
  103 + </select>
102 </div> 104 </div>
103 <div class="input-group" style="float: left;"> 105 <div class="input-group" style="float: left;">
104 - <span class="input-group-addon">功能点:</span>  
105 - <select id="functionPoint" name="functionPoint" class="form-control"> 106 + <span class="input-group-addon">二级页面:</span>
  107 + <select id="level2Page" name="functionPoint" class="form-control">
106 <option value="">全部</option> 108 <option value="">全部</option>
107 - <c:forEach items="${functionPoints }" var="functionPoint">  
108 - <option value="${functionPoint }">${functionPoint }</option> 109 + <c:forEach items="${level2Pages }" var="level2Page">
  110 + <option value="${level2Page }">${level2Page }</option>
109 </c:forEach> 111 </c:forEach>
110 </select> 112 </select>
111 </div> 113 </div>
@@ -125,6 +127,27 @@ @@ -125,6 +127,27 @@
125 <option value="N"></option> 127 <option value="N"></option>
126 </select> 128 </select>
127 </div> 129 </div>
  130 + <div class="input-group" style="float: left;width: 200px;">
  131 + <span class="input-group-addon">配置项:</span>
  132 + <input type="text" id="configName" name="configName" class="form-control" placeholder=""/>
  133 + </div>
  134 + <div class="input-group" style="float: left;width: 200px;">
  135 + <span class="input-group-addon">配置名称:</span>
  136 + <input type="text" id="configShowName" name="configShowName" class="form-control" placeholder=""/>
  137 + </div>
  138 + <div class="input-group" style="float: left;width: 200px;">
  139 + <span class="input-group-addon">接口名称:</span>
  140 + <input type="text" id="apiName" name="apiName" class="form-control" placeholder=""/>
  141 + </div>
  142 + <%--<div class="input-group" style="float: left;width: auto">--%>
  143 + <%--<span class="input-group-addon">功能点:</span>--%>
  144 + <%--<select id="functionPoint" name="functionPoint" class="form-control">--%>
  145 + <%--<option value="">全部</option>--%>
  146 + <%--<c:forEach items="${functionPoints }" var="functionPoint">--%>
  147 + <%--<option value="${functionPoint }">${functionPoint }</option>--%>
  148 + <%--</c:forEach>--%>
  149 + <%--</select>--%>
  150 + <%--</div>--%>
128 <button id="searchDegradeInfoBtn" class="btn btn-primary" style="margin-left: 18px;">搜索</button> 151 <button id="searchDegradeInfoBtn" class="btn btn-primary" style="margin-left: 18px;">搜索</button>
129 </div> 152 </div>
130 </div> 153 </div>
@@ -151,26 +174,44 @@ @@ -151,26 +174,44 @@
151 loadFilter: function (data) { 174 loadFilter: function (data) {
152 return defaultLoadFilter(data); 175 return defaultLoadFilter(data);
153 }, 176 },
154 - columns: [{ 177 + columns: [ {
155 title: "配置项", 178 title: "配置项",
156 - width:"20%", 179 + width:"15%",
157 align:"left", 180 align:"left",
158 field: "configName" 181 field: "configName"
  182 + },{
  183 + title: "一级页面",
  184 + width:"15%",
  185 + field: "level1Page"
  186 + },{
  187 + title: "二级页面",
  188 + width:"20%",
  189 + field: "level2Page"
159 }, { 190 }, {
160 title: "配置名称", 191 title: "配置名称",
161 - width:"20%", 192 + width:"9%",
162 field: "configShowName" 193 field: "configShowName"
  194 + },{
  195 + title: "接口名称",
  196 + width:"9%",
  197 + field: "apiName"
163 }, { 198 }, {
164 title: "配置描述", 199 title: "配置描述",
165 width:"20%", 200 width:"20%",
166 field: "configDesc" 201 field: "configDesc"
167 - }, {  
168 - title: "功能点",  
169 - width:"20%",  
170 - field: "functionPointName"  
171 - }, { 202 + },{
  203 + title: "客户端",
  204 + width:"8%",
  205 + field: "clientType"
  206 + },
  207 +// {
  208 +// title: "功能点",
  209 +// width:"10%",
  210 +// field: "functionPointName"
  211 +// },
  212 + {
172 title: "级别", 213 title: "级别",
173 - width:"5%", 214 + width:"4%",
174 field: "level", 215 field: "level",
175 formatter : function(value, rowData, rowIndex) { 216 formatter : function(value, rowData, rowIndex) {
176 if(value == 1){ 217 if(value == 1){
@@ -180,12 +221,8 @@ @@ -180,12 +221,8 @@
180 } 221 }
181 }, 222 },
182 }, { 223 }, {
183 - title: "图片",  
184 - width:"5%",  
185 - field: "img"  
186 - }, {  
187 title: "开关", 224 title: "开关",
188 - width:"10%", 225 + width:"5%",
189 field: "switchOn", 226 field: "switchOn",
190 formatter : function(value, rowData, rowIndex) { 227 formatter : function(value, rowData, rowIndex) {
191 if(value == "Y"){ 228 if(value == "Y"){
@@ -220,6 +257,10 @@ function updateDegradeInfo(rowData){ @@ -220,6 +257,10 @@ function updateDegradeInfo(rowData){
220 paramObj.switchOn = rowData.switchOn; 257 paramObj.switchOn = rowData.switchOn;
221 paramObj.cloudType = searchCloudType; 258 paramObj.cloudType = searchCloudType;
222 paramObj.functionPointName = rowData.functionPointName; 259 paramObj.functionPointName = rowData.functionPointName;
  260 + paramObj.level1Page = rowData.level1Page;
  261 + paramObj.level2Page = rowData.level2Page;
  262 + paramObj.apiName = rowData.apiName;
  263 + paramObj.clientType = rowData.clientType;
223 var dialog0 = $("<div>").appendTo($("body")); 264 var dialog0 = $("<div>").appendTo($("body"));
224 dialog0.dialog({ 265 dialog0.dialog({
225 size : "modal-lg", 266 size : "modal-lg",
@@ -291,6 +332,10 @@ function updateDegradeInfo(rowData){ @@ -291,6 +332,10 @@ function updateDegradeInfo(rowData){
291 var configShowName=$("#configShowName").val(); 332 var configShowName=$("#configShowName").val();
292 var switchOn= $("#switch").val(); 333 var switchOn= $("#switch").val();
293 var functionPointName = $("#functionPoint").val(); 334 var functionPointName = $("#functionPoint").val();
  335 + var level1Page = $("#level1Page").val();
  336 + var level2Page = $("#level2Page").val();
  337 + var apiName = $("#apiName").val();
  338 + var clientType = $("#clientType").val();
294 searchCloudType = cloudType; 339 searchCloudType = cloudType;
295 340
296 $("#degradeInfoTable").table("load", { 341 $("#degradeInfoTable").table("load", {
@@ -299,7 +344,11 @@ function updateDegradeInfo(rowData){ @@ -299,7 +344,11 @@ function updateDegradeInfo(rowData){
299 'configName': configName , 344 'configName': configName ,
300 'configShowName': configShowName , 345 'configShowName': configShowName ,
301 'switchOn' : switchOn, 346 'switchOn' : switchOn,
302 - 'functionPointName' : functionPointName 347 + 'functionPointName' : functionPointName,
  348 + 'level1Page' : level1Page,
  349 + 'level2Page' : level2Page,
  350 + 'apiName' : apiName,
  351 + 'clientType' : clientType
303 }); 352 });
304 }); 353 });
305 var searchCloudType=$("#cloudType").val(); 354 var searchCloudType=$("#cloudType").val();