Authored by zhaoqi

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

(cherry picked from commit 55700cb9)
@@ -74,12 +74,11 @@ public class HttpUriContants { @@ -74,12 +74,11 @@ public class HttpUriContants {
74 public static final String GET_All_USER = "/user/getAllUser"; 74 public static final String GET_All_USER = "/user/getAllUser";
75 public static final String GET_USER_BY_NAME = "/user/getUserByName"; 75 public static final String GET_USER_BY_NAME = "/user/getUserByName";
76 public static final String GET_USERS = "/user/getUsers"; 76 public static final String GET_USERS = "/user/getUsers";
77 - public static final String GET_USER_BY_ID = "/user/getUserById"; 77 + public static final String GET_USER_BY_ROLE = "/user/getUsersByRole";
78 public static final String USER_INSERT = "/user/insert"; 78 public static final String USER_INSERT = "/user/insert";
79 public static final String USER_UPDATE_PWD = "/user/updatePwd"; 79 public static final String USER_UPDATE_PWD = "/user/updatePwd";
80 public static final String USER_UPDATE = "/user/update"; 80 public static final String USER_UPDATE = "/user/update";
81 public static final String USER_DELETE_NAME = "/user/deleteByName"; 81 public static final String USER_DELETE_NAME = "/user/deleteByName";
82 - public static final String USER_DELETE_ID = "/user/deleteById";  
83 public static final String USER_OPERATE = "/user/operate"; 82 public static final String USER_OPERATE = "/user/operate";
84 83
85 84
@@ -128,8 +127,24 @@ public class HttpUriContants { @@ -128,8 +127,24 @@ public class HttpUriContants {
128 public static final String TASK__SAVE = "/taskConfigure/saveTaskModel"; 127 public static final String TASK__SAVE = "/taskConfigure/saveTaskModel";
129 public static final String TASK__DELETE = "/taskConfigure/delTaskModel"; 128 public static final String TASK__DELETE = "/taskConfigure/delTaskModel";
130 public static final String TASK__GET_ID = "/taskConfigure/getTaskModelById"; 129 public static final String TASK__GET_ID = "/taskConfigure/getTaskModelById";
131 - 130 + public static final String GET_DEGRADE_FUNCTION = "/degrade/getInitInfo";
132 public static final String GET_DEGRADE_INFO = "/degrade/getList"; 131 public static final String GET_DEGRADE_INFO = "/degrade/getList";
133 public static final String EDIT_DEGRADE_INFO = "/degrade/change"; 132 public static final String EDIT_DEGRADE_INFO = "/degrade/change";
134 - public static final String GET_DEGRADE_FUNCTION = "/degrade/getFunction"; 133 +
  134 + /**
  135 + * 工单系统
  136 + */
  137 + public static final String GET_RELEASEWORKJOBS = "/releaseWork/getReleaseWorkJobs";
  138 + public static final String GET_RELEASEWORKJOB_ID = "/releaseWork/getReleaseWorkJob";
  139 + public static final String CREATE_RELEASEWORKJOB = "/releaseWork/createReleaseWorkJob";
  140 + public static final String GET_HANDLED_JOBS = "/handledWork/getHandledJobs";
  141 + public static final String HANDLE_JOB = "/handledWork/dealWorkJob";
  142 + public static final String GET_PENDING_JOBS = "/pendingWork/getPendingJobs";
  143 + public static final String GET_PENDING_JOB_BYUSER = "/pendingWork/getPendingJobByUser";
  144 + public static final String CHECK_RELEASE_ROLE = "/releaseWork/checkRole";
  145 + public static final String GET_WORKJOBS = "/works/getWorkJobs";
  146 + public static final String GET_WORKJOB_ID = "/works/getWorkJob";
  147 +
  148 +
  149 +
135 } 150 }
@@ -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>
@@ -147,41 +170,55 @@ @@ -147,41 +170,55 @@
147 loadFilter: function (data) { 170 loadFilter: function (data) {
148 return defaultLoadFilter(data); 171 return defaultLoadFilter(data);
149 }, 172 },
150 - columns: [{ 173 + columns: [ {
151 title: "配置项", 174 title: "配置项",
152 - width:"20%", 175 + width:"15%",
153 align:"left", 176 align:"left",
154 field: "configName" 177 field: "configName"
  178 + },{
  179 + title: "一级页面",
  180 + width:"15%",
  181 + field: "level1Page"
  182 + },{
  183 + title: "二级页面",
  184 + width:"20%",
  185 + field: "level2Page"
155 }, { 186 }, {
156 title: "配置名称", 187 title: "配置名称",
157 - width:"20%", 188 + width:"9%",
158 field: "configShowName" 189 field: "configShowName"
  190 + },{
  191 + title: "接口名称",
  192 + width:"9%",
  193 + field: "apiName"
159 }, { 194 }, {
160 title: "配置描述", 195 title: "配置描述",
161 width:"20%", 196 width:"20%",
162 field: "configDesc" 197 field: "configDesc"
163 - }, {  
164 - title: "功能点",  
165 - width:"20%",  
166 - field: "functionPointName"  
167 - }, {  
168 - title: "级别",  
169 - width:"5%",  
170 - field: "level",  
171 - formatter : function(value, rowData, rowIndex) {  
172 - if(value == 1){  
173 - return "<div style='background-color: #1f41be'><font color='white'>"+"一级"+"</font></div>";  
174 - }else if(value == 2){  
175 - return "<div style='background-color: #3094be'><font color='white'>"+"二级"+"</font></div>";  
176 - }  
177 - },  
178 - }, {  
179 - title: "图片",  
180 - width:"5%",  
181 - field: "img" 198 + },{
  199 + title: "客户端",
  200 + width:"8%",
  201 + field: "clientType"
  202 + },
  203 +// {
  204 +// title: "功能点",
  205 +// width:"10%",
  206 +// field: "functionPointName"
  207 +// },
  208 + {
  209 + title: "级别",
  210 + width:"4%",
  211 + field: "level",
  212 + formatter : function(value, rowData, rowIndex) {
  213 + if(value == 1){
  214 + return "<div style='background-color: #1f41be'><font color='white'>"+"一级"+"</font></div>";
  215 + }else if(value == 2){
  216 + return "<div style='background-color: #3094be'><font color='white'>"+"二级"+"</font></div>";
  217 + }
  218 + },
182 }, { 219 }, {
183 title: "开关", 220 title: "开关",
184 - width:"10%", 221 + width:"5%",
185 field: "switchOn", 222 field: "switchOn",
186 formatter : function(value, rowData, rowIndex) { 223 formatter : function(value, rowData, rowIndex) {
187 if(value == "Y"){ 224 if(value == "Y"){
@@ -216,6 +253,10 @@ function updateDegradeInfo(rowData){ @@ -216,6 +253,10 @@ function updateDegradeInfo(rowData){
216 paramObj.switchOn = rowData.switchOn; 253 paramObj.switchOn = rowData.switchOn;
217 paramObj.cloudType = searchCloudType; 254 paramObj.cloudType = searchCloudType;
218 paramObj.functionPointName = rowData.functionPointName; 255 paramObj.functionPointName = rowData.functionPointName;
  256 + paramObj.level1Page = rowData.level1Page;
  257 + paramObj.level2Page = rowData.level2Page;
  258 + paramObj.apiName = rowData.apiName;
  259 + paramObj.clientType = rowData.clientType;
219 var dialog0 = $("<div>").appendTo($("body")); 260 var dialog0 = $("<div>").appendTo($("body"));
220 dialog0.dialog({ 261 dialog0.dialog({
221 size : "modal-lg", 262 size : "modal-lg",
@@ -287,6 +328,10 @@ function updateDegradeInfo(rowData){ @@ -287,6 +328,10 @@ function updateDegradeInfo(rowData){
287 var configShowName=$("#configShowName").val(); 328 var configShowName=$("#configShowName").val();
288 var switchOn= $("#switch").val(); 329 var switchOn= $("#switch").val();
289 var functionPointName = $("#functionPoint").val(); 330 var functionPointName = $("#functionPoint").val();
  331 + var level1Page = $("#level1Page").val();
  332 + var level2Page = $("#level2Page").val();
  333 + var apiName = $("#apiName").val();
  334 + var clientType = $("#clientType").val();
290 searchCloudType = cloudType; 335 searchCloudType = cloudType;
291 336
292 $("#degradeInfoTable").table("load", { 337 $("#degradeInfoTable").table("load", {
@@ -295,7 +340,11 @@ function updateDegradeInfo(rowData){ @@ -295,7 +340,11 @@ function updateDegradeInfo(rowData){
295 'configName': configName , 340 'configName': configName ,
296 'configShowName': configShowName , 341 'configShowName': configShowName ,
297 'switchOn' : switchOn, 342 'switchOn' : switchOn,
298 - 'functionPointName' : functionPointName 343 + 'functionPointName' : functionPointName,
  344 + 'level1Page' : level1Page,
  345 + 'level2Page' : level2Page,
  346 + 'apiName' : apiName,
  347 + 'clientType' : clientType
299 }); 348 });
300 }); 349 });
301 var searchCloudType=$("#cloudType").val(); 350 var searchCloudType=$("#cloudType").val();