提交 c1990802 编写于 作者: Y youyong205

Merge pull request #135 from gaocogn/biz

history restore
biz @ dbcbe7e1
Subproject commit dbcbe7e175f7bec0b0d123cdd75f3281bf444794
......@@ -176,6 +176,7 @@ public class Handler implements PageHandler<Context> {
model.setUtilizationList(dUList);
model.setUtilizationWebList(dUWebList);
model.setUtilizationServiceList(dUServiceList);
model.setUtilizationReport(utilizationReport);
break;
}
model.setPage(ReportPage.BUG);
......
......@@ -56,7 +56,6 @@ public class UtilizationReportService extends AbstractReportService<UtilizationR
DailyReport report = m_dailyReportDao.findByDomainNamePeriod(domain, name, new Date(startTime),
DailyReportEntity.READSET_FULL);
String xml = report.getContent();
System.out.println(xml);
UtilizationReport reportModel = com.dianping.cat.home.utilization.transform.DefaultSaxParser.parse(xml);
reportModel.accept(merger);
} catch (Exception e) {
......
......@@ -18,8 +18,6 @@
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&tab=tab1">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlCount&tab=tab1">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlResponse&tab=tab1">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceCount&tab=tab1">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceResponse&tab=tab1">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=sqlCount&tab=tab1">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=pigeonCallCount&tab=tab1">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=swallowCallCount&tab=tab1">Swallow Call Count</th>
......@@ -33,8 +31,6 @@
<td style="text-align:right">${item.machineNumber}</td>
<td style="text-align:right">${w:format(item.urlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.urlResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.serviceCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.sqlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.pigeonCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.swallowCallCount,'#,###,###,###,##0')}</td>
......@@ -51,8 +47,6 @@
<tr>
<th class="left">id</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&tab=tab2">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlCount&tab=tab2">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlResponse&tab=tab2">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceCount&tab=tab2">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceResponse&tab=tab2">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=sqlCount&tab=tab2">SQL Count</th>
......@@ -66,8 +60,6 @@
<tr class="${status.index mod 2 != 0 ? 'odd' : 'even'}">
<td>${item.id}</td>
<td style="text-align:right">${item.machineNumber}</td>
<td style="text-align:right">${w:format(item.urlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.urlResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.serviceCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.sqlCount,'#,###,###,###,##0')}</td>
......
......@@ -56,16 +56,14 @@
<table class="table table-striped table-bordered table-condensed">
<tr>
<th class="left">id</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&tab=tab1">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=urlCount&tab=tab1">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=urlResponse&tab=tab1">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceCount&tab=tab1">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceResponse&tab=tab1">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=sqlCount&tab=tab1">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=pigeonCallCount&tab=tab1">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=swallowCallCount&tab=tab1">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=memcacheCount&tab=tab1">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=webScore&tab=tab1">Web Score</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&tab=tab1">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=urlCount&tab=tab1">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=urlResponse&tab=tab1">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=sqlCount&tab=tab1">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=pigeonCallCount&tab=tab1">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=swallowCallCount&tab=tab1">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=memcacheCount&tab=tab1">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=webScore&tab=tab1">Web Score</th>
</tr>
<c:forEach var="item" items="${model.utilizationWebList}" varStatus="status">
......@@ -74,8 +72,6 @@
<td style="text-align:right">${item.machineNumber}</td>
<td style="text-align:right">${w:format(item.urlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.urlResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.serviceCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.sqlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.pigeonCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.swallowCallCount,'#,###,###,###,##0')}</td>
......@@ -91,24 +87,20 @@
<table class="table table-striped table-bordered table-condensed">
<tr>
<th class="left">id</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&tab=tab2">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=urlCount&tab=tab2">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=urlResponse&tab=tab2">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceCount&tab=tab2">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceResponse&tab=tab2">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=sqlCount&tab=tab2">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=pigeonCallCount&tab=tab2">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=swallowCallCount&tab=tab2">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=memcacheCount&tab=tab2">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceScore&tab=tab2">Service Score</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&tab=tab2">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=serviceCount&tab=tab2">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=serviceResponse&tab=tab2">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=sqlCount&tab=tab2">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=pigeonCallCount&tab=tab2">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=swallowCallCount&tab=tab2">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=memcacheCount&tab=tab2">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=serviceScore&tab=tab2">Service Score</th>
</tr>
<c:forEach var="item" items="${model.utilizationServiceList}" varStatus="status">
<tr class="${status.index mod 2 != 0 ? 'odd' : 'even'}">
<td>${item.id}</td>
<td style="text-align:right">${item.machineNumber}</td>
<td style="text-align:right">${w:format(item.urlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.urlResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.serviceCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.sqlCount,'#,###,###,###,##0')}</td>
......@@ -133,3 +125,13 @@
</table>
</div>
</a:body>
<script type="text/javascript">
$(document).ready(function() {
var tab = '${payload.tab}';
if(tab=='tab2'){
$('#tab2Href').trigger('click');
}else{
$('#tab1Href').trigger('click');
}
});
</script>
......@@ -18,7 +18,7 @@ public class UtilizationBuilderTest extends ComponentTestCase{
DomainManager manager = lookup(DomainManager.class);
manager.initialize();
builder.buildHourlyTask("utilization",CatString.CAT, new SimpleDateFormat("yyyyMMddHH").parse("2013082505"));
builder.buildHourlyTask("utilization",CatString.CAT, new SimpleDateFormat("yyyyMMddHH").parse("2013082617"));
}
@Test
......@@ -27,7 +27,7 @@ public class UtilizationBuilderTest extends ComponentTestCase{
DomainManager manager = lookup(DomainManager.class);
manager.initialize();
builder.buildDailyTask("utilization", CatString.CAT, new SimpleDateFormat("yyyyMMdd").parse("20130825"));
builder.buildDailyTask("utilization", CatString.CAT, new SimpleDateFormat("yyyyMMdd").parse("20130826"));
}
@Test
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册