Authored by mlge

no message

1 package com.ui.ctrl; 1 package com.ui.ctrl;
2 2
3 3
  4 +import com.ui.http.HttpRestClient;
  5 +import com.ui.model.BaseResponse;
  6 +import org.springframework.beans.factory.annotation.Autowired;
4 import org.springframework.stereotype.Controller; 7 import org.springframework.stereotype.Controller;
  8 +import org.springframework.ui.Model;
5 import org.springframework.web.bind.annotation.RequestMapping; 9 import org.springframework.web.bind.annotation.RequestMapping;
6 import org.springframework.web.servlet.ModelAndView; 10 import org.springframework.web.servlet.ModelAndView;
7 11
8 @Controller 12 @Controller
9 @RequestMapping("dashboard") 13 @RequestMapping("dashboard")
10 public class DashboardCtrl { 14 public class DashboardCtrl {
  15 + @Autowired
  16 + private HttpRestClient httpClient;
  17 +
11 18
12 @RequestMapping("/toDashboard") 19 @RequestMapping("/toDashboard")
13 - public ModelAndView toDashboard() { 20 + public ModelAndView toDashboard(Model model) {
  21 + BaseResponse response=httpClient.defaultGet("/dashboardPortal/queryAll", BaseResponse.class);
  22 + if(response!=null&&response.getCode()==200){
  23 + model.addAttribute("portalMap",response.getData());
  24 + }
14 return new ModelAndView("dashBoard/dashBoard"); 25 return new ModelAndView("dashBoard/dashBoard");
15 } 26 }
16 27
@@ -67,266 +67,38 @@ @@ -67,266 +67,38 @@
67 <div class="widget-box"> 67 <div class="widget-box">
68 68
69 <div class="row"> 69 <div class="row">
70 -  
71 - <%--<div class="col-sm-6 col-md-4 col-lg-3 ">  
72 - <div class="thumbnail">  
73 - <div style="width:90%;height:150px;background-color: rebeccapurple;margin:0 auto;" class="jumbotron">  
74 - <h2 style="color:white">运维相关系统</h2>  
75 - </div>  
76 - <div class="caption">  
77 - <h3>  
78 - 开发运维监控信息  
79 - </h3>  
80 - <p><a href="http://dev.yohops.com" target="_blank">http://dev.yohops.com</a></p>  
81 - <br>  
82 - <h3>  
83 - grafana指标  
84 - </h3>  
85 - <p><a href="http://g.yohops.com" target="_blank">http://g.yohops.com</a></p>  
86 - <br>  
87 -  
88 - <h3>  
89 - zookeeper  
90 - </h3>  
91 - <p><a href="http://zk.yohops.com" target="_blank">http://zk.yohops.com</a></p>  
92 - <br>  
93 -  
94 - <h3>  
95 - hystrix监控  
96 - </h3>  
97 - <p><a href="http://www.yohops.com/hystrix/aws" target="_blank">http://www.yohops.com/hystrix/aws</a></p>  
98 - <p><a href="http://www.yohops.com/hystrix/qcloud" target="_blank">http://www.yohops.com/hystrix/qcloud</a></p>  
99 - <br>  
100 -  
101 - <h3>  
102 - 微服务监控  
103 - </h3>  
104 - <p><a href="http://aws-monitor.yohops.com/" target="_blank">http://aws-monitor.yohops.com</a></p>  
105 - <p><a href="http://qq-monitor.yohops.com" target="_blank">http://qq-monitor.yohops.com</a></p>  
106 - <br>  
107 -  
108 - <h3>  
109 - rabbitmq  
110 - </h3>  
111 - <p>aws交易&nbsp;<a href="http://rabbit-aws.yohops.com/" target="_blank">http://rabbit-aws.yohops.com</a></p>  
112 - <p>aws通用&nbsp;<a href="http://rabbit-aws-common.yohops.com/" target="_blank">http://rabbit-aws-common.yohops.com</a></p>  
113 - <p>qq交易&nbsp;&nbsp;&nbsp;<a href="http://rabbit-qq.yohops.com/" target="_blank">http://rabbit-qq.yohops.com</a></p>  
114 - <p>qq通用&nbsp;&nbsp;&nbsp;<a href="http://rabbit-qq-common.yohops.com/" target="_blank">http://rabbit-qq-common.yohops.com</a></p>  
115 - <p>crm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://rabbitmq-crm.yohops.com" target="_blank">http://rabbitmq-crm.yohops.com</a></p>  
116 - <br>  
117 -  
118 -  
119 -  
120 - </div>  
121 - </div>  
122 - </div>--%>  
123 - 70 + <c:forEach items="${portalMap}" var="m" varStatus="mq">
124 <div class="col-sm-12 col-md-6 col-lg-4 "> 71 <div class="col-sm-12 col-md-6 col-lg-4 ">
125 - <div class="thumbnail" style="height:860px;">  
126 - <div style="width:90%;height:150px;background-color: rebeccapurple;margin:0 auto;" class="jumbotron">  
127 - <h2 style="color:white">运维相关系统</h2> 72 + <div class="thumbnail" style="height:780px;">
  73 + <div style="width:90%;height:150px;
  74 + <c:if test="${mq.index == 0}">background-color: rebeccapurple;</c:if>
  75 + <c:if test="${mq.index == 1}">background-color: #0C5F61;</c:if>
  76 + <c:if test="${mq.index == 2}">background-color: #82BD4A;</c:if>
  77 + margin:0 auto;" class="jumbotron">
  78 + <h2 style="color:white">${m.key}</h2>
128 </div> 79 </div>
129 <div class="caption"> 80 <div class="caption">
130 - <h3>  
131 - 开发运维监控信息  
132 - </h3>  
133 - <p><a href="http://dev.yohops.com" target="_blank">http://dev.yohops.com</a></p>  
134 -  
135 -  
136 - <h3>  
137 - grafana指标  
138 - </h3>  
139 - <p><a href="http://g.yohops.com" target="_blank">http://g.yohops.com</a></p>  
140 -  
141 -  
142 -  
143 -  
144 - <h3>  
145 - zookeeper  
146 - </h3>  
147 - <p><a href="http://zk.yohops.com" target="_blank">http://zk.yohops.com</a></p>  
148 -  
149 -  
150 - <h3>  
151 - hystrix监控  
152 - </h3>  
153 - <p><a href="http://www.yohops.com/hystrix/aws" target="_blank">http://www.yohops.com/hystrix/aws</a></p>  
154 - <p><a href="http://www.yohops.com/hystrix/qcloud" target="_blank">http://www.yohops.com/hystrix/qcloud</a></p>  
155 -  
156 -  
157 -  
158 -  
159 - <h3>  
160 - rabbitmq  
161 - </h3>  
162 - <p>aws交易&nbsp;<a href="http://rabbit-aws.yohops.com/" target="_blank">http://rabbit-aws.yohops.com</a></p>  
163 - <p>aws通用&nbsp;<a href="http://rabbit-aws-common.yohops.com/" target="_blank">http://rabbit-aws-common.yohops.com</a></p>  
164 - <p>qq交易&nbsp;&nbsp;&nbsp;<a href="http://rabbit-qq.yohops.com/" target="_blank">http://rabbit-qq.yohops.com</a></p>  
165 - <p>qq通用&nbsp;&nbsp;&nbsp;<a href="http://rabbit-qq-common.yohops.com/" target="_blank">http://rabbit-qq-common.yohops.com</a></p>  
166 - <p>crm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://rabbitmq-crm.yohops.com" target="_blank">http://rabbitmq-crm.yohops.com</a></p>  
167 -  
168 - 81 + <c:forEach items="${m.value}" var="portalSecondMap">
  82 + <h3>
  83 + ${portalSecondMap.key}
  84 + </h3>
  85 + <c:forEach items="${portalSecondMap.value}" var="portal">
  86 + <p>
  87 + <c:if test="${portal.text!=null && portal.text !=''}">
  88 + <span>${portal.text}</span>
  89 + </c:if>
  90 +
  91 + <a href="${portal.link}" target="_blank">${portal.link}</a></p>
  92 + </c:forEach>
  93 +
  94 + </c:forEach>
169 </div> 95 </div>
170 </div> 96 </div>
171 </div> 97 </div>
172 -  
173 -  
174 - <div class="col-sm-12 col-md-6 col-lg-4 ">  
175 - <div class="thumbnail" style="height:860px;">  
176 - <div style="width:90%;height:150px;background-color:#0C5F61;margin:0 auto; " class="jumbotron">  
177 - <h2 style="color:white">开发相关系统</h2>  
178 - </div>  
179 - <div class="caption">  
180 - <h3>  
181 - 研发管理系统  
182 - </h3>  
183 - <p><a href="http://qmc.yohops.com" target="_blank">http://qmc.yohops.com</a></p>  
184 -  
185 - <h3>  
186 - APP日志查询  
187 - </h3>  
188 - <p><a href="http://alog.yohops.com/" target="_blank">http://alog.yohops.com</a></p>  
189 -  
190 - <h3>  
191 - YOHO接口文档  
192 - </h3>  
193 - <p><a href="http://apidoc.yohops.com/" target="_blank">http://apidoc.yohops.com</a></p>  
194 -  
195 - <h3>  
196 - YOHO!任务调度  
197 - </h3>  
198 - <p><a href="http://new0schedule.yohops.com/sched-web/login.jsp" target="_blank">http://new0schedule.yohops.com/sched-web/login.jsp</a></p>  
199 -  
200 - <h3>  
201 - confluence  
202 - </h3>  
203 - <p><a href="http://wiki.yohocorp.com" target="_blank">http://wiki.yohocorp.com</a></p>  
204 -  
205 - <h3>  
206 - superset  
207 - </h3>  
208 - <p><a href="http://superset.yohops.com/login/" target="_blank">http://superset.yohops.com/login/</a></p>  
209 -  
210 - <h3>  
211 - biee  
212 - </h3>  
213 - <p><a href="http://data.yoho.cn/analytics/saw.dll?bieehome" target="_blank">http://data.yoho.cn/analytics/saw.dll?bieehome</a></p>  
214 -  
215 - <h3>  
216 - redmine  
217 - </h3>  
218 - <p><a href="http://redmine.yoho.cn/" target="_blank">http://redmine.yoho.cn</a></p>  
219 -  
220 - <h3>  
221 - nexus  
222 - </h3>  
223 - <p><a href="http://192.168.102.168:18081/nexus/#welcome" target="_blank">http://192.168.102.168:18081/nexus/</a></p>  
224 - </div>  
225 - </div>  
226 - </div>  
227 -  
228 - <div class="col-sm-12 col-md-6 col-lg-4 ">  
229 - <div class="thumbnail" style="height:650px;">  
230 - <div style="width:90%;height:150px;background-color:#82BD4A;margin:0 auto; " class="jumbotron">  
231 - <h2 style="color:white">公司相关系统</h2>  
232 - </div>  
233 - <div class="caption">  
234 - <h3>  
235 - OA  
236 - </h3>  
237 - <p><a href="http://oa.yoho.cn:8090" target="_blank">http://oa.yoho.cn:8090</a></p>  
238 -  
239 - <h3>  
240 - IT网  
241 - </h3>  
242 - <p><a href="http://yoho.yohocorp.com/" target="_blank">http://yoho.yohocorp.com/</a></p>  
243 -  
244 - </div>  
245 - </div>  
246 - </div>  
247 -  
248 -  
249 - 98 + </c:forEach>
250 99
251 </div> 100 </div>
252 101
253 - <%--<div class="panel panel-danger">  
254 - <div class="panel-heading">  
255 - <h3 class="panel-title">Panel title</h3>  
256 - </div>  
257 - <div class="panel-body">  
258 - <div class="jumbotron">  
259 -  
260 - <a class="btn btn-primary btn-lg" style="margin:10px;" href="#" role="button">Learn more</a>  
261 - <a class="btn btn-primary btn-lg" style="margin:10px;" href="#" role="button">Learn more2</a>  
262 - <a class="btn btn-primary btn-lg" style="margin:10px;" href="#" role="button">Learn more3</a>  
263 - <a class="btn btn-primary btn-lg" style="margin:10px;" href="#" role="button">Learn more4</a>  
264 - </div>  
265 - </div>  
266 - &lt;%&ndash;<div class="panel-footer">Panel footer</div>&ndash;%&gt;  
267 - </div>--%>  
268 -  
269 - <%--<div class="panel panel-primary">...</div>  
270 - <div class="panel panel-success">...</div>  
271 - <div class="panel panel-info">...</div>  
272 - <div class="panel panel-warning">...</div>  
273 - <div class="panel panel-danger">...</div>--%>  
274 -  
275 -  
276 - <%--<div class="col-lg-3 col-md-6" style="margin-top: 45px; width: 33.3%;">  
277 - <div class="panel panel-primary">  
278 - <div class="panel-heading">  
279 - <div class="row">  
280 - <div class="col-xs-3" style="margin-left: 25px;">  
281 - <i class="fa fa-globe fa-5x"></i>  
282 - </div>  
283 - <div class="col-xs-9 text-right" style="width: 250px;margin-left: 25px;">  
284 - <div>rabbitmq dashboard</div>  
285 - </div>  
286 - </div>  
287 - </div>  
288 - <a href="http://rabbit-aws.yohops.com/" target="_blank">  
289 - <div class="panel-footer">  
290 - <span class="pull-left">aws交易</span> <span class="pull-right"><i  
291 - class="fa fa-arrow-circle-right"></i></span>  
292 -  
293 - <div class="clearfix"></div>  
294 - </div>  
295 - </a> <a href="http://rabbit-aws-common.yohops.com/" target="_blank">  
296 - <div class="panel-footer">  
297 - <span class="pull-left">aws通用</span> <span class="pull-right"><i  
298 - class="fa fa-arrow-circle-right"></i></span>  
299 -  
300 - <div class="clearfix"></div>  
301 - </div>  
302 - </a> <a href="http://rabbit-qq.yohops.com/" target="_blank">  
303 - <div class="panel-footer">  
304 - <span class="pull-left">qq交易</span> <span class="pull-right"><i  
305 - class="fa fa-arrow-circle-right"></i></span>  
306 -  
307 - <div class="clearfix"></div>  
308 - </div>  
309 - </a> <a href="http://rabbit-qq-common.yohops.com/" target="_blank">  
310 - <div class="panel-footer">  
311 - <span class="pull-left">qq通用</span> <span class="pull-right"><i  
312 - class="fa fa-arrow-circle-right"></i></span>  
313 -  
314 - <div class="clearfix"></div>  
315 - </div>  
316 - </a>  
317 - <a href="http://rabbitmq-crm.yohops.com" target="_blank">  
318 - <div class="panel-footer">  
319 - <span class="pull-left">crm</span> <span class="pull-right"><i  
320 - class="fa fa-arrow-circle-right"></i></span>  
321 -  
322 - <div class="clearfix"></div>  
323 - </div>  
324 - </a>  
325 - </div>  
326 - </div>--%>  
327 -  
328 -  
329 -  
330 102
331 </div> 103 </div>
332 </div> 104 </div>
@@ -250,7 +250,8 @@ @@ -250,7 +250,8 @@
250 if(rowContent){ 250 if(rowContent){
251 var annoteTypeNum=rowContent.indexOf("--"); 251 var annoteTypeNum=rowContent.indexOf("--");
252 if(annoteTypeNum>0){ 252 if(annoteTypeNum>0){
253 - newArry.push(rowContent.substr(0,annoteTypeNum)); 253 + // newArry.push(rowContent.substr(0,annoteTypeNum));
  254 + newArry.push(rowContent);
254 }else if(annoteTypeNum==0){ 255 }else if(annoteTypeNum==0){
255 //去掉 256 //去掉
256 }else{ 257 }else{