From 9a37ba4e65cefd69cbce2eec1408fc835f9f9010 Mon Sep 17 00:00:00 2001 From: Chisu Yu Date: Sun, 3 Nov 2013 02:09:15 +0000 Subject: [PATCH] =?UTF-8?q?[=EC=9C=A0=EC=B9=98=EC=88=98]=20[NOBTS]=20?= =?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@2723 84d0f5b1-2673-498c-a247-62c4ff18d310 --- .../controller/ApplicationMapController.java | 34 +- .../BusinessTransactionController.java | 7 +- .../web/controller/MainController.java | 23 -- .../controller/ScatterChartController.java | 92 ++--- .../pinpoint/web/service/MonitorService.java | 10 - .../web/service/MonitorServiceImpl.java | 28 -- src/main/webapp/WEB-INF/views/agentstatus.jsp | 18 - .../WEB-INF/views/applicationmap.filtered.jsp | 57 ++- .../views/applicationmap.filtered.view.jsp | 189 --------- .../views/applicationmap.filtered2.jsp | 81 ---- src/main/webapp/index_v1.html | 383 ------------------ 11 files changed, 99 insertions(+), 823 deletions(-) delete mode 100644 src/main/java/com/nhn/pinpoint/web/service/MonitorService.java delete mode 100644 src/main/java/com/nhn/pinpoint/web/service/MonitorServiceImpl.java delete mode 100644 src/main/webapp/WEB-INF/views/agentstatus.jsp delete mode 100644 src/main/webapp/WEB-INF/views/applicationmap.filtered.view.jsp delete mode 100644 src/main/webapp/WEB-INF/views/applicationmap.filtered2.jsp delete mode 100644 src/main/webapp/index_v1.html diff --git a/src/main/java/com/nhn/pinpoint/web/controller/ApplicationMapController.java b/src/main/java/com/nhn/pinpoint/web/controller/ApplicationMapController.java index fefcfdb17..28636a506 100644 --- a/src/main/java/com/nhn/pinpoint/web/controller/ApplicationMapController.java +++ b/src/main/java/com/nhn/pinpoint/web/controller/ApplicationMapController.java @@ -1,13 +1,9 @@ package com.nhn.pinpoint.web.controller; -import java.util.Date; import java.util.List; import javax.servlet.http.HttpServletResponse; -import com.nhn.pinpoint.common.util.DateUtils; -import com.nhn.pinpoint.web.filter.FilterBuilder; -import com.nhn.pinpoint.web.vo.LimitedScanResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -18,11 +14,14 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import com.nhn.pinpoint.common.ServiceType; +import com.nhn.pinpoint.common.util.DateUtils; import com.nhn.pinpoint.web.applicationmap.ApplicationMap; import com.nhn.pinpoint.web.filter.Filter; +import com.nhn.pinpoint.web.filter.FilterBuilder; import com.nhn.pinpoint.web.service.ApplicationMapService; import com.nhn.pinpoint.web.service.FlowChartService; import com.nhn.pinpoint.web.util.TimeUtils; +import com.nhn.pinpoint.web.vo.LimitedScanResult; import com.nhn.pinpoint.web.vo.LinkStatistics; import com.nhn.pinpoint.web.vo.TransactionId; @@ -94,27 +93,6 @@ public class ApplicationMapController { return getServerMapData(model, response, applicationName, serviceType, from, to); } - @RequestMapping(value = "/filtermap", method = RequestMethod.GET) - public String filtermap(Model model, - HttpServletResponse response, - @RequestParam("application") String applicationName, - @RequestParam("serviceType") short serviceType, - @RequestParam("from") long from, - @RequestParam("to") long to, - @RequestParam(value = "filter", required = false) String filterText) { - - model.addAttribute("applicationName", applicationName); - model.addAttribute("serviceType", serviceType); - model.addAttribute("from", from); - model.addAttribute("to", to); - model.addAttribute("fromDate", new Date(from)); - model.addAttribute("toDate", new Date(to)); - model.addAttribute("filterText", filterText); - model.addAttribute("filter", filterBuilder.build(filterText)); - - return "applicationmap.filtered.view"; - } - /** * 필터가 적용된 서버맵의 FROM ~ TO기간의 데이터 조회 * @@ -153,9 +131,11 @@ public class ApplicationMapController { model.addAttribute("nodes", map.getNodes()); model.addAttribute("links", map.getLinks()); -// model.addAttribute("timeseriesResponses", map.getTimeseriesResponses()); + + // FIXME linkstatistics detail에 보여주는 timeseries값을 서버맵에서 제공할 예정. + // model.addAttribute("timeseriesResponses", map.getTimeseriesResponses()); - return "applicationmap.filtered2"; + return "applicationmap.filtered"; } /** diff --git a/src/main/java/com/nhn/pinpoint/web/controller/BusinessTransactionController.java b/src/main/java/com/nhn/pinpoint/web/controller/BusinessTransactionController.java index 20a0a704f..b0f65a055 100644 --- a/src/main/java/com/nhn/pinpoint/web/controller/BusinessTransactionController.java +++ b/src/main/java/com/nhn/pinpoint/web/controller/BusinessTransactionController.java @@ -6,8 +6,6 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; -import com.nhn.pinpoint.web.filter.FilterBuilder; -import com.nhn.pinpoint.web.service.SpanResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -19,11 +17,12 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import com.nhn.pinpoint.web.applicationmap.ApplicationMap; -import com.nhn.pinpoint.web.calltree.server.ServerCallTree; import com.nhn.pinpoint.web.calltree.span.SpanAlign; import com.nhn.pinpoint.web.filter.Filter; +import com.nhn.pinpoint.web.filter.FilterBuilder; import com.nhn.pinpoint.web.service.FlowChartService; import com.nhn.pinpoint.web.service.RecordSetService; +import com.nhn.pinpoint.web.service.SpanResult; import com.nhn.pinpoint.web.service.SpanService; import com.nhn.pinpoint.web.util.TimeUtils; import com.nhn.pinpoint.web.vo.BusinessTransactions; @@ -171,8 +170,6 @@ public class BusinessTransactionController { mv.setViewName("transactionInfoJson"); } } - return mv; } - } diff --git a/src/main/java/com/nhn/pinpoint/web/controller/MainController.java b/src/main/java/com/nhn/pinpoint/web/controller/MainController.java index 5cd8502d2..907e95947 100644 --- a/src/main/java/com/nhn/pinpoint/web/controller/MainController.java +++ b/src/main/java/com/nhn/pinpoint/web/controller/MainController.java @@ -1,8 +1,6 @@ package com.nhn.pinpoint.web.controller; import java.util.List; -import java.util.SortedMap; -import java.util.TreeMap; import javax.servlet.http.HttpServletResponse; @@ -13,12 +11,8 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import com.nhn.pinpoint.common.bo.AgentInfoBo; import com.nhn.pinpoint.web.service.FlowChartService; -import com.nhn.pinpoint.web.service.MonitorService; -import com.nhn.pinpoint.web.vo.AgentStatus; import com.nhn.pinpoint.web.vo.Application; /** @@ -33,9 +27,6 @@ public class MainController { @Autowired private FlowChartService flow; - @Autowired - private MonitorService monitor; - @RequestMapping(value = "/applications", method = RequestMethod.GET) public String flow(Model model, HttpServletResponse response) { List applications = flow.selectAllApplicationNames(); @@ -46,20 +37,6 @@ public class MainController { return "applications"; } - @RequestMapping(value = "/agentStatus", method = RequestMethod.GET) - public String agentStatus(Model model, HttpServletResponse response, @RequestParam("agentId") List agentIdList) { - SortedMap statusMap = new TreeMap(); - - for (String agentId : agentIdList) { - AgentInfoBo agentInfo = monitor.getAgentInfo(agentId); - statusMap.put(agentId, new AgentStatus(agentInfo)); - } - - model.addAttribute("statusMap", statusMap); - - return "agentstatus"; - } - @RequestMapping(value = "/serverTime", method = RequestMethod.GET) public String getServerTime(Model model, HttpServletResponse response) { model.addAttribute("currentServerTime", System.currentTimeMillis()); diff --git a/src/main/java/com/nhn/pinpoint/web/controller/ScatterChartController.java b/src/main/java/com/nhn/pinpoint/web/controller/ScatterChartController.java index 5e21aca0c..5535a78a5 100644 --- a/src/main/java/com/nhn/pinpoint/web/controller/ScatterChartController.java +++ b/src/main/java/com/nhn/pinpoint/web/controller/ScatterChartController.java @@ -47,15 +47,15 @@ public class ScatterChartController { @Autowired private FilterBuilder filterBuilder; - @RequestMapping(value = "/selectedScatter", method = RequestMethod.GET) - public String selectedScatter(Model model, HttpServletResponse response) { - return "selectedScatter"; - } - - @RequestMapping(value = "/selectedScatterList", method = RequestMethod.GET) - public String selectedScatterList(Model model, HttpServletResponse response) { - return "selectedScatterList"; - } +// @RequestMapping(value = "/selectedScatter", method = RequestMethod.GET) +// public String selectedScatter(Model model, HttpServletResponse response) { +// return "selectedScatter"; +// } +// +// @RequestMapping(value = "/selectedScatterList", method = RequestMethod.GET) +// public String selectedScatterList(Model model, HttpServletResponse response) { +// return "selectedScatterList"; +// } @RequestMapping(value = "/scatterpopup", method = RequestMethod.GET) public String scatterPopup(Model model, HttpServletResponse response, @RequestParam("application") String applicationName, @RequestParam("from") long from, @RequestParam("to") long to, @RequestParam("period") long period, @RequestParam("usePeriod") boolean usePeriod, @RequestParam(value = "filter", required = false) String filterText) { @@ -164,43 +164,43 @@ public class ScatterChartController { return getScatterData(model, response, applicationName, from, to, limit, filterText, jsonpCallback, version); } - /** - * scatter 실시간 갱신에서는 to 시간을 지정하지 않는다. server time을 사용하고 조회된 시간 범위를 반환해준다. - * UI에서는 반환된 조회 범위를 참조해서 다음 쿼리를 요청한다. - * - * @param model - * @param response - * @param applicationName - * @param from - * @param limit - * @return - */ - @RequestMapping(value = "/getRealtimeScatterData", method = RequestMethod.GET) - public String getRealtimeScatterData(Model model, HttpServletResponse response, @RequestParam("application") String applicationName, @RequestParam("from") long from, @RequestParam("limit") int limit) { - StopWatch watch = new StopWatch(); - watch.start("selectScatterData"); - - long to = TimeUtils.getDelayLastTime(); - - // TODO need filter?? - List scatterData = scatter.selectScatterData(applicationName, from, to, limit); - watch.stop(); - - logger.info("Fetch scatterData time : {}ms", watch.getLastTaskTimeMillis()); - - model.addAttribute("scatter", scatterData); - model.addAttribute("queryFrom", from); - - if (scatterData.size() >= limit) { - model.addAttribute("queryTo", scatterData.get(scatterData.size() - 1).getTimestamp()); - } else { - model.addAttribute("queryTo", to); - } - - model.addAttribute("limit", limit); - - return "scatterRealtime"; - } +// /** +// * scatter 실시간 갱신에서는 to 시간을 지정하지 않는다. server time을 사용하고 조회된 시간 범위를 반환해준다. +// * UI에서는 반환된 조회 범위를 참조해서 다음 쿼리를 요청한다. +// * +// * @param model +// * @param response +// * @param applicationName +// * @param from +// * @param limit +// * @return +// */ +// @RequestMapping(value = "/getRealtimeScatterData", method = RequestMethod.GET) +// public String getRealtimeScatterData(Model model, HttpServletResponse response, @RequestParam("application") String applicationName, @RequestParam("from") long from, @RequestParam("limit") int limit) { +// StopWatch watch = new StopWatch(); +// watch.start("selectScatterData"); +// +// long to = TimeUtils.getDelayLastTime(); +// +// // TODO need filter?? +// List scatterData = scatter.selectScatterData(applicationName, from, to, limit); +// watch.stop(); +// +// logger.info("Fetch scatterData time : {}ms", watch.getLastTaskTimeMillis()); +// +// model.addAttribute("scatter", scatterData); +// model.addAttribute("queryFrom", from); +// +// if (scatterData.size() >= limit) { +// model.addAttribute("queryTo", scatterData.get(scatterData.size() - 1).getTimestamp()); +// } else { +// model.addAttribute("queryTo", to); +// } +// +// model.addAttribute("limit", limit); +// +// return "scatterRealtime"; +// } /** * scatter에서 점 여러개를 선택했을 때 점에 대한 정보를 조회한다. diff --git a/src/main/java/com/nhn/pinpoint/web/service/MonitorService.java b/src/main/java/com/nhn/pinpoint/web/service/MonitorService.java deleted file mode 100644 index 9181800cd..000000000 --- a/src/main/java/com/nhn/pinpoint/web/service/MonitorService.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.nhn.pinpoint.web.service; - -import com.nhn.pinpoint.common.bo.AgentInfoBo; - -/** - * @author netspider - */ -public interface MonitorService { - public AgentInfoBo getAgentInfo(String agentId); -} diff --git a/src/main/java/com/nhn/pinpoint/web/service/MonitorServiceImpl.java b/src/main/java/com/nhn/pinpoint/web/service/MonitorServiceImpl.java deleted file mode 100644 index 2a3ae18b4..000000000 --- a/src/main/java/com/nhn/pinpoint/web/service/MonitorServiceImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.nhn.pinpoint.web.service; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import com.nhn.pinpoint.web.dao.AgentInfoDao; -import com.nhn.pinpoint.common.bo.AgentInfoBo; - -/** - * - * @author netspider - */ -@Service -public class MonitorServiceImpl implements MonitorService { - - private Logger logger = LoggerFactory.getLogger(this.getClass()); - - @Autowired - private AgentInfoDao agentInfoDao; - - public AgentInfoBo getAgentInfo(String agentId) { - AgentInfoBo agentInfo = agentInfoDao.findAgentInfoBeforeStartTime(agentId, System.currentTimeMillis()); - logger.debug("Found agentInfo agentId={}, agentInfo={}", agentId, agentInfo); - return agentInfo; - } -} diff --git a/src/main/webapp/WEB-INF/views/agentstatus.jsp b/src/main/webapp/WEB-INF/views/agentstatus.jsp deleted file mode 100644 index c671953bd..000000000 --- a/src/main/webapp/WEB-INF/views/agentstatus.jsp +++ /dev/null @@ -1,18 +0,0 @@ -<%@ page language="java" contentType="application/json; charset=UTF-8" pageEncoding="UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -{ - -"${agentStatus.key}" : [ ${agentStatus.value.exists}, - - - ${agentStatus.value.checkTime - agentStatus.value.agentInfo.startTime}, - ${agentStatus.value.agentInfo.startTime} - - - -1, -1 - - -], - -} \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/applicationmap.filtered.jsp b/src/main/webapp/WEB-INF/views/applicationmap.filtered.jsp index b2e276b3a..40c8303a6 100644 --- a/src/main/webapp/WEB-INF/views/applicationmap.filtered.jsp +++ b/src/main/webapp/WEB-INF/views/applicationmap.filtered.jsp @@ -2,28 +2,52 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> { + "lastFetchedTimestamp" : ${lastFetchedTimestamp}, "applicationMapData" : { "nodeDataArray": [ { "id" : ${status.count}, "key" : ${status.count}, - "text" : "${node}", - "hosts" : [ - - "${host}" - , - - ], - "category" : "${node.serviceType.desc}", - "serviceTypeCode" : "${node.serviceType.code}", - "terminal" : "${node.serviceType.terminal}", - "agents" : [], + + + "text" : "USER", + + + "text" : "${node.applicationName}", + + + + + "category" : "USER", + + + "category" : "${node.serviceType.desc}", + + "fig" : "Ellipse" "fig" : "RoundedRectangle" "fig" : "Rectangle" - + , + "serviceTypeCode" : "${node.serviceType.code}", + "terminal" : "${node.serviceType.terminal}", + "isWas" : ${node.serviceType.was}, + "serverList" : { + + "${serverInstance.key}" : { + "name" : "${serverInstance.key}", + "status" : null, + "instanceList" : { + + "${instance.key}" : ${instance.value.json} + , + + } + } + , + + } } , ], @@ -38,7 +62,14 @@ "text" : ${link.histogram.totalCount}, "error" : ${link.histogram.errorCount}, "slow" : ${link.histogram.slowCount}, - "histogram" : ${link.histogram}, + "histogram" : ${link.histogram.json}, + "targetHosts" : { + + "${host.value.host}" : { + "histogram" : ${host.value.histogram.json} + }, + + }, "category" : "bad" "category" : "default" diff --git a/src/main/webapp/WEB-INF/views/applicationmap.filtered.view.jsp b/src/main/webapp/WEB-INF/views/applicationmap.filtered.view.jsp deleted file mode 100644 index 63e2f663c..000000000 --- a/src/main/webapp/WEB-INF/views/applicationmap.filtered.view.jsp +++ /dev/null @@ -1,189 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib prefix="pinpoint" uri="http://pinpoint.nhncorp.com/pinpoint" %> - - - - PINPOINT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
- -
-
-
-
-
- - -
-
-
-
-
- - -
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/applicationmap.filtered2.jsp b/src/main/webapp/WEB-INF/views/applicationmap.filtered2.jsp deleted file mode 100644 index 40c8303a6..000000000 --- a/src/main/webapp/WEB-INF/views/applicationmap.filtered2.jsp +++ /dev/null @@ -1,81 +0,0 @@ -<%@ page language="java" contentType="application/json; charset=UTF-8" pageEncoding="UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -{ - "lastFetchedTimestamp" : ${lastFetchedTimestamp}, - "applicationMapData" : { - "nodeDataArray": [ - - { - "id" : ${status.count}, - "key" : ${status.count}, - - - "text" : "USER", - - - "text" : "${node.applicationName}", - - - - - "category" : "USER", - - - "category" : "${node.serviceType.desc}", - - - - "fig" : "Ellipse" - "fig" : "RoundedRectangle" - "fig" : "Rectangle" - , - "serviceTypeCode" : "${node.serviceType.code}", - "terminal" : "${node.serviceType.terminal}", - "isWas" : ${node.serviceType.was}, - "serverList" : { - - "${serverInstance.key}" : { - "name" : "${serverInstance.key}", - "status" : null, - "instanceList" : { - - "${instance.key}" : ${instance.value.json} - , - - } - } - , - - } - } , - - ], - "linkDataArray": [ - - { - "id" : "${link.from.sequence + 1}-${link.to.sequence + 1}", - "from" : ${link.from.sequence + 1}, - "to" : ${link.to.sequence + 1}, - "sourceinfo" : ${link.from.json}, - "targetinfo" : ${link.to.json}, - "text" : ${link.histogram.totalCount}, - "error" : ${link.histogram.errorCount}, - "slow" : ${link.histogram.slowCount}, - "histogram" : ${link.histogram.json}, - "targetHosts" : { - - "${host.value.host}" : { - "histogram" : ${host.value.histogram.json} - }, - - }, - - "category" : "bad" - "category" : "default" - - } , - - ] - } -} \ No newline at end of file diff --git a/src/main/webapp/index_v1.html b/src/main/webapp/index_v1.html deleted file mode 100644 index 7a5f84833..000000000 --- a/src/main/webapp/index_v1.html +++ /dev/null @@ -1,383 +0,0 @@ - - - - PINPOINT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - -
-
-
-
-
- -
- -
-
-
-
-
- - -
-
-
- - - - - - - - - - - \ No newline at end of file