Showing
8 changed files
with
29 additions
and
12 deletions
@@ -28,6 +28,7 @@ public class HttpUriContants { | @@ -28,6 +28,7 @@ public class HttpUriContants { | ||
28 | public static String TYPE_QUERY_NODE = "/type/queryNode"; | 28 | public static String TYPE_QUERY_NODE = "/type/queryNode"; |
29 | public static String TYPE_QUERY_JAVAAPI = "/type/queryJavaApi"; | 29 | public static String TYPE_QUERY_JAVAAPI = "/type/queryJavaApi"; |
30 | public static String TYPE_GET_ZKTREE = "/type/queryZk"; | 30 | public static String TYPE_GET_ZKTREE = "/type/queryZk"; |
31 | + public static String TYPE_GET_ZK_LEAF = "/type/queryZkLeaf"; | ||
31 | 32 | ||
32 | /*** | 33 | /*** |
33 | * 主机信息 | 34 | * 主机信息 |
@@ -24,6 +24,11 @@ public class CacheInfoCtrl { | @@ -24,6 +24,11 @@ public class CacheInfoCtrl { | ||
24 | @SuppressWarnings("unchecked") | 24 | @SuppressWarnings("unchecked") |
25 | @RequestMapping("/info") | 25 | @RequestMapping("/info") |
26 | public ModelAndView getCacheInfoInitList(Model model) { | 26 | public ModelAndView getCacheInfoInitList(Model model) { |
27 | + BaseResponse zkListResponse=httpClient.defaultGet(HttpUriContants.TYPE_GET_ZK_LEAF, BaseResponse.class); | ||
28 | + if(zkListResponse!=null&&zkListResponse.getCode()==200&&zkListResponse.getData()!=null){ | ||
29 | + model.addAttribute("zkList",zkListResponse.getData()); | ||
30 | + } | ||
31 | + | ||
27 | BaseResponse<List<String>> categories = httpClient.defaultPost(HttpUriContants.GET_CACHE_FUNCTION, null, | 32 | BaseResponse<List<String>> categories = httpClient.defaultPost(HttpUriContants.GET_CACHE_FUNCTION, null, |
28 | BaseResponse.class); | 33 | BaseResponse.class); |
29 | List<String> catList = categories.getData(); | 34 | List<String> catList = categories.getData(); |
@@ -4,6 +4,7 @@ import com.ui.contants.HttpUriContants; | @@ -4,6 +4,7 @@ import com.ui.contants.HttpUriContants; | ||
4 | import com.ui.http.HttpRestClient; | 4 | import com.ui.http.HttpRestClient; |
5 | import com.ui.model.BaseResponse; | 5 | import com.ui.model.BaseResponse; |
6 | import com.ui.model.req.DegradeInfoReq; | 6 | import com.ui.model.req.DegradeInfoReq; |
7 | +import com.ui.model.req.TypeInfoReq; | ||
7 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
8 | import org.springframework.stereotype.Controller; | 9 | import org.springframework.stereotype.Controller; |
9 | import org.springframework.ui.Model; | 10 | import org.springframework.ui.Model; |
@@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody; | @@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody; | ||
12 | import org.springframework.web.servlet.ModelAndView; | 13 | import org.springframework.web.servlet.ModelAndView; |
13 | 14 | ||
14 | import java.util.HashMap; | 15 | import java.util.HashMap; |
16 | +import java.util.List; | ||
17 | +import java.util.stream.Collectors; | ||
15 | 18 | ||
16 | /** | 19 | /** |
17 | * Created by zhaoqi on 2016/8/29 0029. | 20 | * Created by zhaoqi on 2016/8/29 0029. |
@@ -25,6 +28,11 @@ public class DegradeInfoCtrl { | @@ -25,6 +28,11 @@ public class DegradeInfoCtrl { | ||
25 | 28 | ||
26 | @RequestMapping("/info") | 29 | @RequestMapping("/info") |
27 | public ModelAndView toDegradeList(Model model) { | 30 | public ModelAndView toDegradeList(Model model) { |
31 | + BaseResponse zkListResponse=httpClient.defaultGet(HttpUriContants.TYPE_GET_ZK_LEAF, BaseResponse.class); | ||
32 | + if(zkListResponse!=null&&zkListResponse.getCode()==200&&zkListResponse.getData()!=null){ | ||
33 | + model.addAttribute("zkList",zkListResponse.getData()); | ||
34 | + } | ||
35 | + | ||
28 | BaseResponse degradeFunction = httpClient.defaultPost(HttpUriContants.GET_DEGRADE_FUNCTION,null,BaseResponse.class); | 36 | BaseResponse degradeFunction = httpClient.defaultPost(HttpUriContants.GET_DEGRADE_FUNCTION,null,BaseResponse.class); |
29 | if (degradeFunction.getData() != null){ | 37 | if (degradeFunction.getData() != null){ |
30 | model.addAttribute("functionPoints",((HashMap)degradeFunction.getData()).get("function")); | 38 | model.addAttribute("functionPoints",((HashMap)degradeFunction.getData()).get("function")); |
@@ -24,6 +24,11 @@ public class HystrixInfoCtrl { | @@ -24,6 +24,11 @@ public class HystrixInfoCtrl { | ||
24 | @SuppressWarnings("unchecked") | 24 | @SuppressWarnings("unchecked") |
25 | @RequestMapping("/info") | 25 | @RequestMapping("/info") |
26 | public ModelAndView getHystrixInfoInitList(Model model) { | 26 | public ModelAndView getHystrixInfoInitList(Model model) { |
27 | + BaseResponse zkListResponse=httpClient.defaultGet(HttpUriContants.TYPE_GET_ZK_LEAF, BaseResponse.class); | ||
28 | + if(zkListResponse!=null&&zkListResponse.getCode()==200&&zkListResponse.getData()!=null){ | ||
29 | + model.addAttribute("zkList",zkListResponse.getData()); | ||
30 | + } | ||
31 | + | ||
27 | BaseResponse<List<String>> categories = httpClient.defaultPost(HttpUriContants.GET_HYSTRIX_FUNCTION, null, | 32 | BaseResponse<List<String>> categories = httpClient.defaultPost(HttpUriContants.GET_HYSTRIX_FUNCTION, null, |
28 | BaseResponse.class); | 33 | BaseResponse.class); |
29 | List<String> catList = categories.getData(); | 34 | List<String> catList = categories.getData(); |
@@ -89,10 +89,9 @@ | @@ -89,10 +89,9 @@ | ||
89 | <div class="input-group" style="float: left;"> | 89 | <div class="input-group" style="float: left;"> |
90 | <span class="input-group-addon">服务器:</span> | 90 | <span class="input-group-addon">服务器:</span> |
91 | <select id="serverType" name="serverType" class="form-control"> | 91 | <select id="serverType" name="serverType" class="form-control"> |
92 | - <!-- <option value="all">全部</option> --> | ||
93 | - <option value="zookeeper_aws">aws</option> | ||
94 | - <option value="zookeeper_qq">qCloud</option> | ||
95 | - <option value="gray_qq">gray</option> | 92 | + <c:forEach items="${zkList}" var="zk"> |
93 | + <option value="${zk.typeName}">${zk.typeName}</option> | ||
94 | + </c:forEach> | ||
96 | </select> | 95 | </select> |
97 | </div> | 96 | </div> |
98 | 97 |
@@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
90 | <span class="input-group-addon">范围选择:</span> | 90 | <span class="input-group-addon">范围选择:</span> |
91 | <select class="form-control" id="choosenCloud"> | 91 | <select class="form-control" id="choosenCloud"> |
92 | <option value="qcloud">腾讯云</option> | 92 | <option value="qcloud">腾讯云</option> |
93 | - <option value="aws">AWS</option> | 93 | + <%--<option value="aws">AWS</option>--%> |
94 | </select> | 94 | </select> |
95 | </div> | 95 | </div> |
96 | <button class="btn btn-primary" style="margin-left: 18px;" onclick="compareAll()">对比</button> | 96 | <button class="btn btn-primary" style="margin-left: 18px;" onclick="compareAll()">对比</button> |
@@ -89,9 +89,9 @@ | @@ -89,9 +89,9 @@ | ||
89 | <div class="input-group" style="float: left;"> | 89 | <div class="input-group" style="float: left;"> |
90 | <span class="input-group-addon">服务器:</span> | 90 | <span class="input-group-addon">服务器:</span> |
91 | <select id="cloudType" name="cloudType" class="form-control"> | 91 | <select id="cloudType" name="cloudType" class="form-control"> |
92 | - <option value="zookeeper_aws">aws</option> | ||
93 | - <option value="zookeeper_qq">qCloud</option> | ||
94 | - <option value="gray_qq">gray</option> | 92 | + <c:forEach items="${zkList}" var="zk"> |
93 | + <option value="${zk.typeName}">${zk.typeName}</option> | ||
94 | + </c:forEach> | ||
95 | </select> | 95 | </select> |
96 | </div> | 96 | </div> |
97 | <div class="input-group" style="float: left;"> | 97 | <div class="input-group" style="float: left;"> |
@@ -89,10 +89,9 @@ | @@ -89,10 +89,9 @@ | ||
89 | <div class="input-group" style="float: left;"> | 89 | <div class="input-group" style="float: left;"> |
90 | <span class="input-group-addon">服务器:</span> | 90 | <span class="input-group-addon">服务器:</span> |
91 | <select id="serverType" name="serverType" class="form-control"> | 91 | <select id="serverType" name="serverType" class="form-control"> |
92 | - <!-- <option value="all">全部</option> --> | ||
93 | - <option value="zookeeper_aws">aws</option> | ||
94 | - <option value="zookeeper_qq">qCloud</option> | ||
95 | - <option value="gray_qq">gray</option> | 92 | + <c:forEach items="${zkList}" var="zk"> |
93 | + <option value="${zk.typeName}">${zk.typeName}</option> | ||
94 | + </c:forEach> | ||
96 | </select> | 95 | </select> |
97 | </div> | 96 | </div> |
98 | 97 |
-
Please register or login to post a comment