提交 232f757f 编写于 作者: Y youyong

modify the cat history bug

上级 ed22e999
...@@ -148,10 +148,15 @@ public abstract class AbstractReportPayload<A extends Action> implements ActionP ...@@ -148,10 +148,15 @@ public abstract class AbstractReportPayload<A extends Action> implements ActionP
} else { } else {
temp = m_date + (ONE_HOUR * 24); temp = m_date + (ONE_HOUR * 24);
} }
cal.setTimeInMillis(temp -1000); cal.setTimeInMillis(temp);
return cal.getTime(); return cal.getTime();
} }
public Date getHistoryDisplayEndDate() {
Date date = getHistoryEndDate();
return new Date(date.getTime() - 1000);
}
public Date getHistoryStartDate() { public Date getHistoryStartDate() {
if (m_customStart != null) { if (m_customStart != null) {
try { try {
...@@ -161,7 +166,7 @@ public abstract class AbstractReportPayload<A extends Action> implements ActionP ...@@ -161,7 +166,7 @@ public abstract class AbstractReportPayload<A extends Action> implements ActionP
} }
return new Date(m_date); return new Date(m_date);
} }
public String getIpAddress() { public String getIpAddress() {
return m_ipAddress; return m_ipAddress;
} }
......
...@@ -125,6 +125,10 @@ a.long-sql { ...@@ -125,6 +125,10 @@ a.long-sql {
background-color: #6699CC; background-color: #6699CC;
} }
a.long-service {
background-color: #7799FF;
}
a.url { a.url {
background-color: #cc0000; background-color: #cc0000;
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<a:historyReport title="Cross Report" <a:historyReport title="Cross Report"
navUrlPrefix="ip=${model.ipAddress}&domain=${model.domain}"> navUrlPrefix="ip=${model.ipAddress}&domain=${model.domain}">
<jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute> <jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyDisplayEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute>
<jsp:body> <jsp:body>
<res:useCss value="${res.css.local.cross_css}" target="head-css" /> <res:useCss value="${res.css.local.cross_css}" target="head-css" />
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<a:historyReport title="Cross Report" <a:historyReport title="Cross Report"
navUrlPrefix="ip=${model.ipAddress}&domain=${model.domain}"> navUrlPrefix="ip=${model.ipAddress}&domain=${model.domain}">
<jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute> <jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyDisplayEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute>
<jsp:body> <jsp:body>
<res:useCss value="${res.css.local.cross_css}" target="head-css" /> <res:useCss value="${res.css.local.cross_css}" target="head-css" />
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<a:historyReport title="Cross Report" <a:historyReport title="Cross Report"
navUrlPrefix="ip=${model.ipAddress}&domain=${model.domain}"> navUrlPrefix="ip=${model.ipAddress}&domain=${model.domain}">
<jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute> <jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyDisplayEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute>
<jsp:body> <jsp:body>
<res:useCss value="${res.css.local.cross_css}" target="head-css" /> <res:useCss value="${res.css.local.cross_css}" target="head-css" />
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<jsp:useBean id="model" type="com.dianping.cat.report.page.event.Model" scope="request" /> <jsp:useBean id="model" type="com.dianping.cat.report.page.event.Model" scope="request" />
<a:historyReport title="History Report" navUrlPrefix="type=${payload.type}&ip=${model.ipAddress}"> <a:historyReport title="History Report" navUrlPrefix="type=${payload.type}&ip=${model.ipAddress}">
<jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute> <jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyDisplayEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute>
<jsp:body> <jsp:body>
<res:useCss value="${res.css.local.event_css}" target="head-css" /> <res:useCss value="${res.css.local.event_css}" target="head-css" />
<res:useJs value="${res.js.local['jquery-1.7.1.js']}" target="head-js"/> <res:useJs value="${res.js.local['jquery-1.7.1.js']}" target="head-js"/>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<jsp:useBean id="model" type="com.dianping.cat.report.page.heartbeat.Model" scope="request" /> <jsp:useBean id="model" type="com.dianping.cat.report.page.heartbeat.Model" scope="request" />
<a:historyReport title="HeartBeat History Report"> <a:historyReport title="HeartBeat History Report">
<jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute> <jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyDisplayEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute>
<jsp:body> <jsp:body>
<res:useCss value="${res.css.local.transaction_css}" target="head-css" /> <res:useCss value="${res.css.local.transaction_css}" target="head-css" />
<res:useJs value="${res.js.local['jquery-1.7.1.js']}" target="head-js"/> <res:useJs value="${res.js.local['jquery-1.7.1.js']}" target="head-js"/>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<jsp:useBean id="model" type="com.dianping.cat.report.page.matrix.Model" scope="request" /> <jsp:useBean id="model" type="com.dianping.cat.report.page.matrix.Model" scope="request" />
<a:historyReport title="History Report" navUrlPrefix="domain=${model.domain}"> <a:historyReport title="History Report" navUrlPrefix="domain=${model.domain}">
<jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute> <jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyDisplayEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute>
<jsp:body> <jsp:body>
<res:useCss value="${res.css.local.matrix_css}" target="head-css" /> <res:useCss value="${res.css.local.matrix_css}" target="head-css" />
</br> </br>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<a:historyReport title="History Report" navUrlPrefix="threshold=${model.threshold}&sqlThreshold=${model.sqlThreshold}&ip=${model.ipAddress}"> <a:historyReport title="History Report" navUrlPrefix="threshold=${model.threshold}&sqlThreshold=${model.sqlThreshold}&ip=${model.ipAddress}">
<jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute> <jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyDisplayEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute>
<jsp:body> <jsp:body>
<res:useCss value="${res.css.local.problem_css}" target="head-css"/> <res:useCss value="${res.css.local.problem_css}" target="head-css"/>
<res:useJs value="${res.js.local['jquery-1.7.1.js']}" target="head-js" /> <res:useJs value="${res.js.local['jquery-1.7.1.js']}" target="head-js" />
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<jsp:useBean id="model" type="com.dianping.cat.report.page.transaction.Model" scope="request" /> <jsp:useBean id="model" type="com.dianping.cat.report.page.transaction.Model" scope="request" />
<a:historyReport title="History Report" navUrlPrefix="type=${payload.type}&queryname=${model.queryName}"> <a:historyReport title="History Report" navUrlPrefix="type=${payload.type}&queryname=${model.queryName}">
<jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute> <jsp:attribute name="subtitle">From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyDisplayEndDate,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute>
<jsp:body> <jsp:body>
<res:useCss value="${res.css.local.transaction_css}" target="head-css" /> <res:useCss value="${res.css.local.transaction_css}" target="head-css" />
<res:useJs value="${res.js.local['jquery-1.7.1.js']}" target="head-js"/> <res:useJs value="${res.js.local['jquery-1.7.1.js']}" target="head-js"/>
......
...@@ -65,7 +65,7 @@ public class TestSendMessage { ...@@ -65,7 +65,7 @@ public class TestSendMessage {
public void sendPigeonServerTransaction() throws Exception { public void sendPigeonServerTransaction() throws Exception {
for (int i = 0; i < 100; i++) { for (int i = 0; i < 100; i++) {
Transaction t = Cat.getProducer().newTransaction("PigeonService", "Method6"); Transaction t = Cat.getProducer().newTransaction("PigeonService", "Method6");
Cat.getProducer().newEvent("PigeonCall.client", "192.168.7.77"); Cat.getProducer().newEvent("PigeonService.client", "192.168.7.77");
t.addData("key and value"); t.addData("key and value");
Thread.sleep(1); Thread.sleep(1);
...@@ -73,7 +73,7 @@ public class TestSendMessage { ...@@ -73,7 +73,7 @@ public class TestSendMessage {
} }
for (int i = 0; i < 200; i++) { for (int i = 0; i < 200; i++) {
Transaction t = Cat.getProducer().newTransaction("PigeonService", "Method8"); Transaction t = Cat.getProducer().newTransaction("PigeonService", "Method8");
Cat.getProducer().newEvent("PigeonCall.client", "192.168.7.20"); Cat.getProducer().newEvent("PigeonService.client", "192.168.7.20");
t.addData("key and value"); t.addData("key and value");
Thread.sleep(1); Thread.sleep(1);
...@@ -82,7 +82,7 @@ public class TestSendMessage { ...@@ -82,7 +82,7 @@ public class TestSendMessage {
for (int i = 0; i < 300; i++) { for (int i = 0; i < 300; i++) {
Transaction t = Cat.getProducer().newTransaction("PigeonService", "Method5"); Transaction t = Cat.getProducer().newTransaction("PigeonService", "Method5");
Cat.getProducer().newEvent("PigeonCall.client", "192.168.7.231"); Cat.getProducer().newEvent("PigeonService.client", "192.168.7.231");
t.addData("key and value"); t.addData("key and value");
Thread.sleep(1); Thread.sleep(1);
......
...@@ -200,6 +200,6 @@ public class PayloadTest { ...@@ -200,6 +200,6 @@ public class PayloadTest {
} }
private Date adjustEndDate(Date date){ private Date adjustEndDate(Date date){
return new Date(date.getTime()+1000); return new Date(date.getTime());
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册