diff --git a/src/main/java/com/nhn/hippo/web/controller/BusinessTransactionController.java b/src/main/java/com/nhn/hippo/web/controller/BusinessTransactionController.java index 997cedcf1..40e6983f8 100644 --- a/src/main/java/com/nhn/hippo/web/controller/BusinessTransactionController.java +++ b/src/main/java/com/nhn/hippo/web/controller/BusinessTransactionController.java @@ -1,5 +1,6 @@ package com.nhn.hippo.web.controller; +import java.util.Date; import java.util.List; import java.util.Set; @@ -59,8 +60,12 @@ public class BusinessTransactionController extends BaseController { BusinessTransactions selectBusinessTransactions = flow.selectBusinessTransactions(traceIdList, applicationName, from, to); - model.addAttribute("businessTransactions", selectBusinessTransactions.getBusinessTransactionIterator()); - + model.addAttribute("rpcList", selectBusinessTransactions.getBusinessTransactionIterator()); + model.addAttribute("requestList", selectBusinessTransactions.getBusinessTransactionIterator()); + model.addAttribute("applicationName", applicationName); + model.addAttribute("from", new Date(from)); + model.addAttribute("to", new Date(to)); + addResponseHeader(response); return "businesstransactions"; } diff --git a/src/main/java/com/nhn/hippo/web/vo/BusinessTransactions.java b/src/main/java/com/nhn/hippo/web/vo/BusinessTransactions.java index af6e6ab45..ba3b57cb1 100644 --- a/src/main/java/com/nhn/hippo/web/vo/BusinessTransactions.java +++ b/src/main/java/com/nhn/hippo/web/vo/BusinessTransactions.java @@ -10,7 +10,6 @@ import com.profiler.common.bo.SpanBo; public class BusinessTransactions { private final Map transactions = new HashMap(); - private Iterator> iterator; public void add(SpanBo span) { String rpc = span.getRpc(); @@ -22,7 +21,7 @@ public class BusinessTransactions { } public Iterator getBusinessTransactionIterator() { - iterator = transactions.entrySet().iterator(); + final Iterator> iterator = transactions.entrySet().iterator(); return new Iterator() { @Override @@ -41,6 +40,4 @@ public class BusinessTransactions { } }; } - - } diff --git a/src/main/webapp/WEB-INF/views/businesstransactions.jsp b/src/main/webapp/WEB-INF/views/businesstransactions.jsp index ed125b879..6822a7b2f 100644 --- a/src/main/webapp/WEB-INF/views/businesstransactions.jsp +++ b/src/main/webapp/WEB-INF/views/businesstransactions.jsp @@ -1,23 +1,117 @@ -<%@ page language="java" contentType="text/html; 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" %> -{ - "businessTransactions" : [ - - { - "name" : "${t.rpc}", - "calls" : ${t.calls}, - "avgTime" : , - "minTime" : ${t.minTime}, - "maxTime" : ${t.maxTime}, - "health" : 1, - "traces" : [ - - { "traceId" : "${trace.traceId}", "executionTime" : ${trace.executionTime}, "timestamp" : ${trace.startTime} } - , - - ] - } , - - ] -} \ No newline at end of file +<%@ page language="java" contentType="text/html; 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"%> +<%@ taglib prefix="hippo" uri="http://hippo.nhncorp.com/hippo" %> + + + + PROBE - ${applicationName} request list + + + + + + + + + + + + + + + + + + + + + + + +

Application : ${applicationName}

+
Time : ~
+ +
+
+
URL list
+ + + + + + + + + + + + + + + + + + + + + +
URLCallsAvgMinMax
${t.rpc}
+
+ +
+ + + +
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/selectTransaction.jsp b/src/main/webapp/WEB-INF/views/selectTransaction.jsp index 233a1487b..e2fe34596 100644 --- a/src/main/webapp/WEB-INF/views/selectTransaction.jsp +++ b/src/main/webapp/WEB-INF/views/selectTransaction.jsp @@ -11,6 +11,7 @@ + diff --git a/src/main/webapp/common/css/hippo/hippo.css b/src/main/webapp/common/css/hippo/hippo.css index 9b1c7c356..d1c80e38e 100644 --- a/src/main/webapp/common/css/hippo/hippo.css +++ b/src/main/webapp/common/css/hippo/hippo.css @@ -92,18 +92,6 @@ path.link { display:none; } -/* Sortable tables */ -table.sortable thead { - background-color:#eee; - color:#666666; - font-weight: bold; - cursor: pointer; -} - -table.sortable th.sorttable_nosort { - cursor:default; -} - .hippo-action-icon { cursor:pointer; } \ No newline at end of file diff --git a/src/main/webapp/common/css/hippo/sorttable.css b/src/main/webapp/common/css/hippo/sorttable.css new file mode 100644 index 000000000..7c417bd95 --- /dev/null +++ b/src/main/webapp/common/css/hippo/sorttable.css @@ -0,0 +1,11 @@ +/* Sortable tables */ +table.sortable thead { + background-color:#eee; + color:#666666; + font-weight: bold; + cursor: pointer; +} + +table.sortable th.sorttable_nosort { + cursor:default; +} \ No newline at end of file diff --git a/src/main/webapp/common/js/hippo/chart-transactions.js b/src/main/webapp/common/js/hippo/chart-transactions.js index fb77ee680..daf1b864a 100644 --- a/src/main/webapp/common/js/hippo/chart-transactions.js +++ b/src/main/webapp/common/js/hippo/chart-transactions.js @@ -1,18 +1,16 @@ function showRequests(applicationName) { - $("#businessTransactions TBODY").empty(); - $("#businessTransactionsDetail TBODY").empty(); - - var businessTransactionCallback = function(data) { - showTransactionList(data.businessTransactions); - }; - + var app = applicationName.split("@"); if (isQueryFromNow()) { - getLastBusinessTransactionsData(applicationName, getQueryPeriod(), businessTransactionCallback); + var begin = getQueryStartTime(); + var end = getQueryEndTime(); + window.open("/getBusinessTransactionsData.hippo?application=" + app[0] + "&from=" + begin + "&to=" + end); } else { - getBusinessTransactionsData(applicationName, getQueryStartTime(), getQueryEndTime(), businessTransactionCallback); + var period = getQueryPeriod(); + window.open("/getLastBusinessTransactionsData.hippo?application=" + app[0] + "&period=" + period); } } +/* var transactionsCache; var prevDetaildRow; @@ -74,13 +72,11 @@ function openTransactionDetails(index, row) { html.push(formatDate(new Date(traces[i].timestamp))); html.push(""); - /* html.push(""); html.push(traces[i].traceId); html.push(""); - */ html.push(""); html.push(traces[i].executionTime); @@ -89,4 +85,5 @@ function openTransactionDetails(index, row) { html.push(""); } $("#businessTransactionsDetail TBODY").append(html.join('')); -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/src/main/webapp/common/js/hippo/hippo.js b/src/main/webapp/common/js/hippo/hippo.js index ad7234d8b..d80c2ac12 100644 --- a/src/main/webapp/common/js/hippo/hippo.js +++ b/src/main/webapp/common/js/hippo/hippo.js @@ -41,16 +41,6 @@ function getRealtimeScatterData(application, begin, callback) { d3.json("/getRealtimeScatterData.hippo?application=" + app[0] + "&from=" + begin + "&limit=5000", function(d) { callback(d); }); } -function getBusinessTransactionsData(application, begin, end, callback) { - var application = $("#application").val().split("@")[0]; - d3.json("/getBusinessTransactionsData.hippo?application=" + app[0] + "&from=" + begin + "&to=" + end, function(d) { callback(d); }); -} - -function getLastBusinessTransactionsData(application, period, callback) { - var app = application.split("@"); - d3.json("/getLastBusinessTransactionsData.hippo?application=" + app[0] + "&period=" + period, function(d) { callback(d); }); -} - function getQueryPeriod() { return $("#period").find("button.active").val().split(",") * 1000 * 60; } diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 487eb6833..6a055792e 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -9,6 +9,7 @@ + @@ -191,6 +192,7 @@ + Response Time (ms) @@ -228,6 +228,7 @@ + --> @@ -291,7 +292,6 @@ $(document).ready(function () { } showServerMap(applicationName); - showRequests(applicationName); showResponseScatter(applicationName); }