Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
c1d9e900
C
cat
项目概览
梦中观雨
/
cat
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c1d9e900
编写于
8月 15, 2012
作者:
Y
youyong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify the cat dashboard
上级
ce01792b
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
385 addition
and
149 deletion
+385
-149
cat-home/src/main/java/com/dianping/cat/report/page/cross/Model.java
...c/main/java/com/dianping/cat/report/page/cross/Model.java
+9
-9
cat-home/src/main/java/com/dianping/cat/report/page/cross/Payload.java
...main/java/com/dianping/cat/report/page/cross/Payload.java
+8
-8
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/HostInfo.java
.../com/dianping/cat/report/page/cross/display/HostInfo.java
+30
-30
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/MethodInfo.java
...om/dianping/cat/report/page/cross/display/MethodInfo.java
+26
-26
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/NameDetailInfo.java
...ianping/cat/report/page/cross/display/NameDetailInfo.java
+6
-6
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/ProjectInfo.java
...m/dianping/cat/report/page/cross/display/ProjectInfo.java
+4
-4
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/TypeDetailInfo.java
...ianping/cat/report/page/cross/display/TypeDetailInfo.java
+8
-8
cat-home/src/main/java/com/dianping/cat/report/page/dashboard/Handler.java
.../java/com/dianping/cat/report/page/dashboard/Handler.java
+207
-42
cat-home/src/main/java/com/dianping/cat/report/page/dashboard/Payload.java
.../java/com/dianping/cat/report/page/dashboard/Payload.java
+62
-0
cat-home/src/main/resources/META-INF/plexus/components.xml
cat-home/src/main/resources/META-INF/plexus/components.xml
+8
-3
cat-home/src/test/java/com/dianping/cat/report/page/transaction/PayloadTest.java
...com/dianping/cat/report/page/transaction/PayloadTest.java
+17
-13
未找到文件。
cat-home/src/main/java/com/dianping/cat/report/page/cross/Model.java
浏览文件 @
c1d9e900
...
@@ -77,14 +77,18 @@ public class Model extends AbstractReportModel<Action, Context> {
...
@@ -77,14 +77,18 @@ public class Model extends AbstractReportModel<Action, Context> {
return
m_projectInfo
;
return
m_projectInfo
;
}
}
public
String
getQueryName
()
{
return
m_queryName
;
}
public
CrossReport
getReport
()
{
public
CrossReport
getReport
()
{
return
m_report
;
return
m_report
;
}
}
public
String
getServiceSort
()
{
public
String
getServiceSort
()
{
return
m_serviceSort
;
return
m_serviceSort
;
}
}
public
void
setCallSort
(
String
callSort
)
{
public
void
setCallSort
(
String
callSort
)
{
m_callSort
=
callSort
;
m_callSort
=
callSort
;
...
@@ -102,6 +106,10 @@ public class Model extends AbstractReportModel<Action, Context> {
...
@@ -102,6 +106,10 @@ public class Model extends AbstractReportModel<Action, Context> {
m_projectInfo
=
projectInfo
;
m_projectInfo
=
projectInfo
;
}
}
public
void
setQueryName
(
String
queryName
)
{
m_queryName
=
queryName
;
}
public
void
setReport
(
CrossReport
report
)
{
public
void
setReport
(
CrossReport
report
)
{
m_report
=
report
;
m_report
=
report
;
}
}
...
@@ -109,13 +117,5 @@ public class Model extends AbstractReportModel<Action, Context> {
...
@@ -109,13 +117,5 @@ public class Model extends AbstractReportModel<Action, Context> {
public
void
setServiceSort
(
String
serviceSort
)
{
public
void
setServiceSort
(
String
serviceSort
)
{
m_serviceSort
=
serviceSort
;
m_serviceSort
=
serviceSort
;
}
}
public
String
getQueryName
()
{
return
m_queryName
;
}
public
void
setQueryName
(
String
queryName
)
{
m_queryName
=
queryName
;
}
}
}
cat-home/src/main/java/com/dianping/cat/report/page/cross/Payload.java
浏览文件 @
c1d9e900
...
@@ -59,6 +59,10 @@ public class Payload extends AbstractReportPayload<Action> {
...
@@ -59,6 +59,10 @@ public class Payload extends AbstractReportPayload<Action> {
return
m_projectName
;
return
m_projectName
;
}
}
public
String
getQueryName
()
{
return
m_queryName
;
}
public
String
getRemoteIp
()
{
public
String
getRemoteIp
()
{
return
m_remoteIp
;
return
m_remoteIp
;
}
}
...
@@ -84,6 +88,10 @@ public class Payload extends AbstractReportPayload<Action> {
...
@@ -84,6 +88,10 @@ public class Payload extends AbstractReportPayload<Action> {
m_projectName
=
projectName
;
m_projectName
=
projectName
;
}
}
public
void
setQueryName
(
String
queryName
)
{
m_queryName
=
queryName
;
}
public
void
setRemoteIp
(
String
remoteIp
)
{
public
void
setRemoteIp
(
String
remoteIp
)
{
m_remoteIp
=
remoteIp
;
m_remoteIp
=
remoteIp
;
}
}
...
@@ -92,14 +100,6 @@ public class Payload extends AbstractReportPayload<Action> {
...
@@ -92,14 +100,6 @@ public class Payload extends AbstractReportPayload<Action> {
m_serviceSort
=
serviceSort
;
m_serviceSort
=
serviceSort
;
}
}
public
String
getQueryName
()
{
return
m_queryName
;
}
public
void
setQueryName
(
String
queryName
)
{
m_queryName
=
queryName
;
}
@Override
@Override
public
void
validate
(
ActionContext
<?>
ctx
)
{
public
void
validate
(
ActionContext
<?>
ctx
)
{
if
(
m_action
==
null
)
{
if
(
m_action
==
null
)
{
...
...
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/HostInfo.java
浏览文件 @
c1d9e900
...
@@ -99,6 +99,31 @@ public class HostInfo extends BaseVisitor {
...
@@ -99,6 +99,31 @@ public class HostInfo extends BaseVisitor {
return
values
;
return
values
;
}
}
public
boolean
projectContains
(
String
ip
,
String
projectName
)
{
if
(
ALL
.
equalsIgnoreCase
(
projectName
)){
return
true
;
}
if
(
ip
.
indexOf
(
':'
)
>
0
)
{
ip
=
ip
.
substring
(
0
,
ip
.
indexOf
(
':'
));
}
try
{
Hostinfo
hostInfo
=
m_hostInfoDao
.
findByIp
(
ip
,
HostinfoEntity
.
READSET_FULL
);
if
(
hostInfo
!=
null
)
{
if
(
projectName
.
equalsIgnoreCase
(
hostInfo
.
getDomain
())){
return
true
;
}
else
{
return
false
;
}
}
}
catch
(
DalException
e
)
{
if
(
projectName
.
equals
(
UNKNOWN_PROJECT
)){
return
true
;
}
}
return
false
;
}
public
HostInfo
setCallSortBy
(
String
callSoryBy
)
{
public
HostInfo
setCallSortBy
(
String
callSoryBy
)
{
m_callSortBy
=
callSoryBy
;
m_callSortBy
=
callSoryBy
;
return
this
;
return
this
;
...
@@ -109,6 +134,10 @@ public class HostInfo extends BaseVisitor {
...
@@ -109,6 +134,10 @@ public class HostInfo extends BaseVisitor {
return
this
;
return
this
;
}
}
public
void
setHostInfoDao
(
HostinfoDao
hostInfoDao
)
{
m_hostInfoDao
=
hostInfoDao
;
}
public
HostInfo
setProjectName
(
String
projectName
)
{
public
HostInfo
setProjectName
(
String
projectName
)
{
this
.
m_projectName
=
projectName
;
this
.
m_projectName
=
projectName
;
return
this
;
return
this
;
...
@@ -123,7 +152,7 @@ public class HostInfo extends BaseVisitor {
...
@@ -123,7 +152,7 @@ public class HostInfo extends BaseVisitor {
public
void
visitCrossReport
(
CrossReport
crossReport
)
{
public
void
visitCrossReport
(
CrossReport
crossReport
)
{
super
.
visitCrossReport
(
crossReport
);
super
.
visitCrossReport
(
crossReport
);
}
}
@Override
@Override
public
void
visitLocal
(
Local
local
)
{
public
void
visitLocal
(
Local
local
)
{
if
(
m_clientIp
.
equalsIgnoreCase
(
"All"
)
||
m_clientIp
.
equalsIgnoreCase
(
local
.
getId
()))
{
if
(
m_clientIp
.
equalsIgnoreCase
(
"All"
)
||
m_clientIp
.
equalsIgnoreCase
(
local
.
getId
()))
{
...
@@ -147,34 +176,5 @@ public class HostInfo extends BaseVisitor {
...
@@ -147,34 +176,5 @@ public class HostInfo extends BaseVisitor {
}
}
}
}
public
boolean
projectContains
(
String
ip
,
String
projectName
)
{
if
(
ALL
.
equalsIgnoreCase
(
projectName
)){
return
true
;
}
if
(
ip
.
indexOf
(
':'
)
>
0
)
{
ip
=
ip
.
substring
(
0
,
ip
.
indexOf
(
':'
));
}
try
{
Hostinfo
hostInfo
=
m_hostInfoDao
.
findByIp
(
ip
,
HostinfoEntity
.
READSET_FULL
);
if
(
hostInfo
!=
null
)
{
if
(
projectName
.
equalsIgnoreCase
(
hostInfo
.
getDomain
())){
return
true
;
}
else
{
return
false
;
}
}
}
catch
(
DalException
e
)
{
if
(
projectName
.
equals
(
UNKNOWN_PROJECT
)){
return
true
;
}
}
return
false
;
}
public
void
setHostInfoDao
(
HostinfoDao
hostInfoDao
)
{
m_hostInfoDao
=
hostInfoDao
;
}
}
}
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/MethodInfo.java
浏览文件 @
c1d9e900
...
@@ -87,6 +87,10 @@ public class MethodInfo extends BaseVisitor {
...
@@ -87,6 +87,10 @@ public class MethodInfo extends BaseVisitor {
return
values
;
return
values
;
}
}
public
String
getQuery
()
{
return
m_query
;
}
public
long
getReportDuration
()
{
public
long
getReportDuration
()
{
return
m_reportDuration
;
return
m_reportDuration
;
}
}
...
@@ -98,6 +102,19 @@ public class MethodInfo extends BaseVisitor {
...
@@ -98,6 +102,19 @@ public class MethodInfo extends BaseVisitor {
return
values
;
return
values
;
}
}
private
boolean
isFit
(
String
queryName
,
String
methodName
)
{
String
[]
args
=
queryName
.
split
(
"\\|"
);
if
(
args
!=
null
)
{
for
(
String
str
:
args
)
{
if
(
str
.
length
()
>
0
&&
methodName
.
toLowerCase
().
contains
(
str
.
trim
().
toLowerCase
()))
{
return
true
;
}
}
}
return
false
;
}
public
MethodInfo
setCallSortBy
(
String
callSoryBy
)
{
public
MethodInfo
setCallSortBy
(
String
callSoryBy
)
{
m_callSortBy
=
callSoryBy
;
m_callSortBy
=
callSoryBy
;
return
this
;
return
this
;
...
@@ -108,6 +125,11 @@ public class MethodInfo extends BaseVisitor {
...
@@ -108,6 +125,11 @@ public class MethodInfo extends BaseVisitor {
return
this
;
return
this
;
}
}
public
MethodInfo
setQuery
(
String
query
)
{
m_query
=
query
;
return
this
;
}
public
MethodInfo
setRemoteIp
(
String
remoteIp
)
{
public
MethodInfo
setRemoteIp
(
String
remoteIp
)
{
m_remoteIp
=
remoteIp
;
m_remoteIp
=
remoteIp
;
return
this
;
return
this
;
...
@@ -118,12 +140,6 @@ public class MethodInfo extends BaseVisitor {
...
@@ -118,12 +140,6 @@ public class MethodInfo extends BaseVisitor {
return
this
;
return
this
;
}
}
@Override
public
void
visitType
(
Type
type
)
{
m_currentType
=
type
.
getId
();
super
.
visitType
(
type
);
}
@Override
@Override
public
void
visitCrossReport
(
CrossReport
crossReport
)
{
public
void
visitCrossReport
(
CrossReport
crossReport
)
{
super
.
visitCrossReport
(
crossReport
);
super
.
visitCrossReport
(
crossReport
);
...
@@ -136,15 +152,6 @@ public class MethodInfo extends BaseVisitor {
...
@@ -136,15 +152,6 @@ public class MethodInfo extends BaseVisitor {
}
}
}
}
public
String
getQuery
()
{
return
m_query
;
}
public
MethodInfo
setQuery
(
String
query
)
{
m_query
=
query
;
return
this
;
}
@Override
@Override
public
void
visitName
(
Name
name
)
{
public
void
visitName
(
Name
name
)
{
String
role
=
m_currentRole
;
String
role
=
m_currentRole
;
...
@@ -166,16 +173,9 @@ public class MethodInfo extends BaseVisitor {
...
@@ -166,16 +173,9 @@ public class MethodInfo extends BaseVisitor {
}
}
}
}
private
boolean
isFit
(
String
queryName
,
String
methodName
)
{
@Override
String
[]
args
=
queryName
.
split
(
"\\|"
);
public
void
visitType
(
Type
type
)
{
m_currentType
=
type
.
getId
();
if
(
args
!=
null
)
{
super
.
visitType
(
type
);
for
(
String
str
:
args
)
{
if
(
str
.
length
()
>
0
&&
methodName
.
toLowerCase
().
contains
(
str
.
trim
().
toLowerCase
()))
{
return
true
;
}
}
}
return
false
;
}
}
}
}
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/NameDetailInfo.java
浏览文件 @
c1d9e900
...
@@ -63,6 +63,10 @@ public class NameDetailInfo {
...
@@ -63,6 +63,10 @@ public class NameDetailInfo {
return
m_tps
;
return
m_tps
;
}
}
public
String
getType
()
{
return
m_type
;
}
public
void
mergeName
(
Name
name
)
{
public
void
mergeName
(
Name
name
)
{
m_totalCount
+=
name
.
getTotalCount
();
m_totalCount
+=
name
.
getTotalCount
();
m_failureCount
+=
name
.
getFailCount
();
m_failureCount
+=
name
.
getFailCount
();
...
@@ -101,15 +105,11 @@ public class NameDetailInfo {
...
@@ -101,15 +105,11 @@ public class NameDetailInfo {
m_sum
=
sum
;
m_sum
=
sum
;
}
}
public
String
getType
(
)
{
public
void
setTotalCount
(
long
totalCount
)
{
return
m_type
;
m_totalCount
=
totalCount
;
}
}
public
void
setType
(
String
type
)
{
public
void
setType
(
String
type
)
{
m_type
=
type
;
m_type
=
type
;
}
}
public
void
setTotalCount
(
long
totalCount
)
{
m_totalCount
=
totalCount
;
}
}
}
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/ProjectInfo.java
浏览文件 @
c1d9e900
...
@@ -121,6 +121,10 @@ public class ProjectInfo extends BaseVisitor {
...
@@ -121,6 +121,10 @@ public class ProjectInfo extends BaseVisitor {
return
this
;
return
this
;
}
}
public
void
setHostInfoDao
(
HostinfoDao
hostInfoDao
)
{
m_hostInfoDao
=
hostInfoDao
;
}
public
ProjectInfo
setServiceSortBy
(
String
serviceSortBy
)
{
public
ProjectInfo
setServiceSortBy
(
String
serviceSortBy
)
{
m_serviceSortBy
=
serviceSortBy
;
m_serviceSortBy
=
serviceSortBy
;
return
this
;
return
this
;
...
@@ -150,8 +154,4 @@ public class ProjectInfo extends BaseVisitor {
...
@@ -150,8 +154,4 @@ public class ProjectInfo extends BaseVisitor {
}
}
}
}
public
void
setHostInfoDao
(
HostinfoDao
hostInfoDao
)
{
m_hostInfoDao
=
hostInfoDao
;
}
}
}
cat-home/src/main/java/com/dianping/cat/report/page/cross/display/TypeDetailInfo.java
浏览文件 @
c1d9e900
...
@@ -45,6 +45,10 @@ public class TypeDetailInfo {
...
@@ -45,6 +45,10 @@ public class TypeDetailInfo {
return
m_failurePercent
;
return
m_failurePercent
;
}
}
public
String
getIp
()
{
return
m_ip
;
}
public
String
getProjectName
()
{
public
String
getProjectName
()
{
return
m_projectName
;
return
m_projectName
;
}
}
...
@@ -92,6 +96,10 @@ public class TypeDetailInfo {
...
@@ -92,6 +96,10 @@ public class TypeDetailInfo {
m_failurePercent
=
failrePercent
;
m_failurePercent
=
failrePercent
;
}
}
public
void
setIp
(
String
ip
)
{
m_ip
=
ip
;
}
public
void
setSum
(
double
sum
)
{
public
void
setSum
(
double
sum
)
{
m_sum
=
sum
;
m_sum
=
sum
;
}
}
...
@@ -103,13 +111,5 @@ public class TypeDetailInfo {
...
@@ -103,13 +111,5 @@ public class TypeDetailInfo {
public
void
setType
(
String
type
)
{
public
void
setType
(
String
type
)
{
m_type
=
type
;
m_type
=
type
;
}
}
public
String
getIp
()
{
return
m_ip
;
}
public
void
setIp
(
String
ip
)
{
m_ip
=
ip
;
}
}
}
cat-home/src/main/java/com/dianping/cat/report/page/dashboard/Handler.java
浏览文件 @
c1d9e900
package
com.dianping.cat.report.page.dashboard
;
package
com.dianping.cat.report.page.dashboard
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.text.DecimalFormat
;
import
java.text.NumberFormat
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.
Set
;
import
java.util.
Map.Entry
;
import
javax.servlet.ServletException
;
import
javax.servlet.ServletException
;
import
org.apache.commons.lang.StringUtils
;
import
com.dianping.cat.consumer.event.model.entity.EventName
;
import
com.dianping.cat.consumer.event.model.entity.EventReport
;
import
com.dianping.cat.consumer.event.model.entity.EventReport
;
import
com.dianping.cat.consumer.event.model.entity.EventType
;
import
com.dianping.cat.consumer.event.model.entity.EventType
;
import
com.dianping.cat.consumer.problem.model.entity.ProblemReport
;
import
com.dianping.cat.consumer.transaction.model.entity.Machine
;
import
com.dianping.cat.consumer.transaction.model.entity.Machine
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionName
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionReport
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionReport
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionType
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionType
;
import
com.dianping.cat.report.ReportPage
;
import
com.dianping.cat.report.ReportPage
;
...
@@ -18,6 +26,9 @@ import com.dianping.cat.report.page.model.spi.ModelPeriod;
...
@@ -18,6 +26,9 @@ import com.dianping.cat.report.page.model.spi.ModelPeriod;
import
com.dianping.cat.report.page.model.spi.ModelRequest
;
import
com.dianping.cat.report.page.model.spi.ModelRequest
;
import
com.dianping.cat.report.page.model.spi.ModelResponse
;
import
com.dianping.cat.report.page.model.spi.ModelResponse
;
import
com.dianping.cat.report.page.model.spi.ModelService
;
import
com.dianping.cat.report.page.model.spi.ModelService
;
import
com.dianping.cat.report.page.problem.ProblemStatistics
;
import
com.dianping.cat.report.page.problem.ProblemStatistics.StatusStatistics
;
import
com.dianping.cat.report.page.problem.ProblemStatistics.TypeStatistics
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.site.lookup.annotation.Inject
;
import
com.site.lookup.annotation.Inject
;
import
com.site.web.mvc.PageHandler
;
import
com.site.web.mvc.PageHandler
;
...
@@ -26,20 +37,164 @@ import com.site.web.mvc.annotation.OutboundActionMeta;
...
@@ -26,20 +37,164 @@ import com.site.web.mvc.annotation.OutboundActionMeta;
import
com.site.web.mvc.annotation.PayloadMeta
;
import
com.site.web.mvc.annotation.PayloadMeta
;
public
class
Handler
implements
PageHandler
<
Context
>
{
public
class
Handler
implements
PageHandler
<
Context
>
{
@Inject
(
type
=
ModelService
.
class
,
value
=
"event"
)
private
ModelService
<
EventReport
>
m_eventService
;
private
Gson
m_gson
=
new
Gson
();
@Inject
@Inject
private
JspViewer
m_jspViewer
;
private
JspViewer
m_jspViewer
;
@Inject
(
type
=
ModelService
.
class
,
value
=
"event"
)
private
ModelService
<
EventReport
>
m_eventService
;
@Inject
(
type
=
ModelService
.
class
,
value
=
"transaction"
)
@Inject
(
type
=
ModelService
.
class
,
value
=
"transaction"
)
private
ModelService
<
TransactionReport
>
m_transactionService
;
private
ModelService
<
TransactionReport
>
m_transactionService
;
private
EventReport
getEventHourlyReport
(
String
domain
)
{
@Inject
(
type
=
ModelService
.
class
,
value
=
"problem"
)
private
ModelService
<
ProblemReport
>
m_problemService
;
private
NumberFormat
m_format
=
new
DecimalFormat
(
"#0.00"
);
private
static
final
String
COUNT
=
"Count"
;
private
static
final
String
TIME
=
"ResponseTime"
;
private
void
buildEventReportResult
(
EventReport
eventReport
,
String
ip
,
String
type
,
String
name
,
Map
<
String
,
String
>
data
)
{
com
.
dianping
.
cat
.
consumer
.
event
.
model
.
entity
.
Machine
eventMachine
=
eventReport
.
getMachines
().
get
(
ip
);
if
(
eventMachine
!=
null
)
{
if
(
StringUtils
.
isEmpty
(
name
)
&&
StringUtils
.
isEmpty
(
type
))
{
if
(
eventMachine
!=
null
)
{
Collection
<
EventType
>
types
=
eventMachine
.
getTypes
().
values
();
for
(
EventType
eventType
:
types
)
{
String
id
=
eventType
.
getId
();
data
.
put
(
id
+
COUNT
,
String
.
valueOf
(
eventType
.
getTotalCount
()));
}
}
}
else
if
(
StringUtils
.
isEmpty
(
name
)
&&
!
StringUtils
.
isEmpty
(
type
))
{
EventType
eventType
=
eventMachine
.
findType
(
type
);
if
(
type
!=
null
)
{
data
.
put
(
COUNT
,
String
.
valueOf
(
eventType
.
getTotalCount
()));
}
}
else
if
(!
StringUtils
.
isEmpty
(
name
)
&&
!
StringUtils
.
isEmpty
(
type
))
{
EventType
eventType
=
eventMachine
.
findType
(
type
);
if
(
type
!=
null
)
{
EventName
eventName
=
eventType
.
findName
(
name
);
if
(
eventName
!=
null
)
{
data
.
put
(
COUNT
,
String
.
valueOf
(
eventName
.
getTotalCount
()));
}
}
}
}
}
private
void
buildProblemReportResult
(
ProblemReport
problemReport
,
String
ip
,
String
type
,
String
name
,
Map
<
String
,
String
>
data
)
{
ProblemStatistics
problemStatistics
=
new
ProblemStatistics
();
if
(
ip
.
equals
(
Payload
.
ALL
))
{
problemStatistics
.
setAllIp
(
true
);
}
else
{
problemStatistics
.
setIp
(
ip
);
}
problemStatistics
.
visitProblemReport
(
problemReport
);
if
(
StringUtils
.
isEmpty
(
name
)
&&
StringUtils
.
isEmpty
(
type
))
{
Map
<
String
,
TypeStatistics
>
status
=
problemStatistics
.
getStatus
();
for
(
Entry
<
String
,
TypeStatistics
>
temp
:
status
.
entrySet
())
{
String
key
=
temp
.
getKey
();
TypeStatistics
value
=
temp
.
getValue
();
data
.
put
(
key
+
COUNT
,
String
.
valueOf
(
value
.
getCount
()));
}
}
else
if
(
StringUtils
.
isEmpty
(
name
)
&&
!
StringUtils
.
isEmpty
(
type
))
{
Map
<
String
,
TypeStatistics
>
status
=
problemStatistics
.
getStatus
();
TypeStatistics
value
=
status
.
get
(
type
);
if
(
value
!=
null
)
{
data
.
put
(
COUNT
,
String
.
valueOf
(
value
.
getCount
()));
}
}
else
if
(!
StringUtils
.
isEmpty
(
name
)
&&
!
StringUtils
.
isEmpty
(
type
))
{
Map
<
String
,
TypeStatistics
>
status
=
problemStatistics
.
getStatus
();
TypeStatistics
value
=
status
.
get
(
type
);
if
(
value
!=
null
)
{
StatusStatistics
nameValue
=
value
.
getStatus
().
get
(
name
);
if
(
nameValue
!=
null
)
{
data
.
put
(
COUNT
,
String
.
valueOf
(
nameValue
.
getCount
()));
}
}
}
}
private
void
buildTransactionReportResult
(
TransactionReport
transactionReport
,
String
ip
,
String
type
,
String
name
,
Map
<
String
,
String
>
data
)
{
Machine
transactionMachine
=
transactionReport
.
getMachines
().
get
(
ip
);
if
(
transactionMachine
!=
null
)
{
if
(
StringUtils
.
isEmpty
(
name
)
&&
StringUtils
.
isEmpty
(
type
))
{
if
(
transactionMachine
!=
null
)
{
Collection
<
TransactionType
>
types
=
transactionMachine
.
getTypes
().
values
();
for
(
TransactionType
transactionType
:
types
)
{
String
id
=
transactionType
.
getId
();
data
.
put
(
id
+
TIME
,
m_format
.
format
(
transactionType
.
getAvg
()));
data
.
put
(
id
+
COUNT
,
String
.
valueOf
(
transactionType
.
getTotalCount
()));
}
}
}
else
if
(
StringUtils
.
isEmpty
(
name
)
&&
!
StringUtils
.
isEmpty
(
type
))
{
TransactionType
transactionType
=
transactionMachine
.
findType
(
type
);
if
(
transactionType
!=
null
)
{
data
.
put
(
TIME
,
m_format
.
format
(
transactionType
.
getAvg
()));
data
.
put
(
COUNT
,
String
.
valueOf
(
transactionType
.
getTotalCount
()));
}
}
else
if
(!
StringUtils
.
isEmpty
(
name
)
&&
!
StringUtils
.
isEmpty
(
type
))
{
TransactionType
transactionType
=
transactionMachine
.
findType
(
type
);
if
(
transactionType
!=
null
)
{
TransactionName
transactionName
=
transactionType
.
findName
(
name
);
if
(
transactionName
!=
null
)
{
data
.
put
(
TIME
,
m_format
.
format
(
transactionName
.
getAvg
()));
data
.
put
(
COUNT
,
String
.
valueOf
(
transactionName
.
getTotalCount
()));
}
}
}
}
}
private
Map
<
String
,
String
>
getBaseInfoByDomian
(
String
domain
,
String
ip
)
{
Map
<
String
,
String
>
data
=
new
HashMap
<
String
,
String
>();
TransactionReport
transactionReport
=
getTransactionHourlyReport
(
domain
,
ip
,
null
,
null
);
Machine
transactionMachine
=
transactionReport
.
getMachines
().
get
(
ip
);
if
(
transactionMachine
!=
null
)
{
if
(
transactionMachine
!=
null
)
{
Collection
<
TransactionType
>
types
=
transactionMachine
.
getTypes
().
values
();
for
(
TransactionType
type
:
types
)
{
String
name
=
type
.
getId
();
data
.
put
(
name
+
TIME
,
m_format
.
format
(
type
.
getAvg
()));
data
.
put
(
name
+
COUNT
,
m_format
.
format
(
type
.
getTotalCount
()));
}
}
}
EventReport
eventReport
=
getEventHourlyReport
(
domain
,
ip
,
null
);
com
.
dianping
.
cat
.
consumer
.
event
.
model
.
entity
.
Machine
eventMachine
=
eventReport
.
getMachines
().
get
(
ip
);
if
(
eventMachine
!=
null
)
{
long
exceptionCount
=
0
;
EventType
exception
=
eventMachine
.
findType
(
"Exception"
);
EventType
runtimeException
=
eventMachine
.
findType
(
"RuntimeException"
);
if
(
exception
!=
null
)
{
exceptionCount
+=
exception
.
getTotalCount
();
}
if
(
runtimeException
!=
null
)
{
exceptionCount
+=
runtimeException
.
getTotalCount
();
}
data
.
put
(
"Exception"
,
String
.
valueOf
(
exceptionCount
));
}
return
data
;
}
private
EventReport
getEventHourlyReport
(
String
domain
,
String
ip
,
String
type
)
{
ModelRequest
request
=
new
ModelRequest
(
domain
,
ModelPeriod
.
CURRENT
)
//
ModelRequest
request
=
new
ModelRequest
(
domain
,
ModelPeriod
.
CURRENT
)
//
.
setProperty
(
"ip"
,
"All"
);
.
setProperty
(
"ip"
,
ip
);
if
(!
StringUtils
.
isEmpty
(
type
))
{
request
.
setProperty
(
"type"
,
type
);
}
if
(
m_transactionService
.
isEligable
(
request
))
{
if
(
m_transactionService
.
isEligable
(
request
))
{
ModelResponse
<
EventReport
>
response
=
m_eventService
.
invoke
(
request
);
ModelResponse
<
EventReport
>
response
=
m_eventService
.
invoke
(
request
);
...
@@ -50,9 +205,28 @@ public class Handler implements PageHandler<Context> {
...
@@ -50,9 +205,28 @@ public class Handler implements PageHandler<Context> {
}
}
}
}
private
TransactionReport
getTransactionHourlyReport
(
String
domain
)
{
private
ProblemReport
getProblemHourlyReport
(
String
domain
,
String
ip
)
{
ModelRequest
request
=
new
ModelRequest
(
domain
,
ModelPeriod
.
CURRENT
)
//
.
setProperty
(
"type"
,
"view"
);
if
(!
ip
.
equals
(
Payload
.
ALL
))
{
request
.
setProperty
(
"ip"
,
ip
);
}
if
(
m_transactionService
.
isEligable
(
request
))
{
ModelResponse
<
ProblemReport
>
response
=
m_problemService
.
invoke
(
request
);
ProblemReport
report
=
response
.
getModel
();
return
report
;
}
else
{
throw
new
RuntimeException
(
"Internal error: no eligable transaction service registered for "
+
request
+
"!"
);
}
}
private
TransactionReport
getTransactionHourlyReport
(
String
domain
,
String
ip
,
String
type
,
String
name
)
{
ModelRequest
request
=
new
ModelRequest
(
domain
,
ModelPeriod
.
CURRENT
)
//
ModelRequest
request
=
new
ModelRequest
(
domain
,
ModelPeriod
.
CURRENT
)
//
.
setProperty
(
"ip"
,
"All"
);
.
setProperty
(
"ip"
,
ip
);
if
(!
StringUtils
.
isEmpty
(
name
))
{
request
.
setProperty
(
"type"
,
type
);
}
if
(
m_transactionService
.
isEligable
(
request
))
{
if
(
m_transactionService
.
isEligable
(
request
))
{
ModelResponse
<
TransactionReport
>
response
=
m_transactionService
.
invoke
(
request
);
ModelResponse
<
TransactionReport
>
response
=
m_transactionService
.
invoke
(
request
);
...
@@ -77,47 +251,38 @@ public class Handler implements PageHandler<Context> {
...
@@ -77,47 +251,38 @@ public class Handler implements PageHandler<Context> {
model
.
setAction
(
Action
.
VIEW
);
model
.
setAction
(
Action
.
VIEW
);
model
.
setPage
(
ReportPage
.
DASHBOARD
);
model
.
setPage
(
ReportPage
.
DASHBOARD
);
TransactionReport
catReport
=
getTransactionHourlyReport
(
"Cat"
);
Set
<
String
>
domains
=
catReport
.
getDomainNames
();
Payload
payload
=
ctx
.
getPayload
();
Map
<
String
,
String
>
data
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
data
=
new
HashMap
<
String
,
String
>();
data
.
put
(
"timestamp"
,
String
.
valueOf
(
new
Date
().
getTime
()));
data
.
put
(
"timestamp"
,
String
.
valueOf
(
new
Date
().
getTime
()));
TransactionReport
report
=
null
;
String
domain
=
payload
.
getDomain
();
for
(
String
domain
:
domains
)
{
if
(!
StringUtils
.
isEmpty
(
domain
))
{
if
(
domain
.
equals
(
"Cat"
))
{
String
report
=
payload
.
getReport
();
report
=
catReport
;
String
type
=
payload
.
getType
();
}
else
{
String
name
=
payload
.
getName
();
report
=
getTransactionHourlyReport
(
domain
);
String
ip
=
payload
.
getIp
();
}
Machine
machine
=
report
.
getMachines
().
get
(
"All"
);
if
(
machine
!=
null
)
{
TransactionType
urlDetail
=
machine
.
getTypes
().
get
(
"URL"
);
if
(
urlDetail
!=
null
)
{
data
.
put
(
domain
+
"UrlTotal"
,
String
.
valueOf
(
urlDetail
.
getTotalCount
()));
data
.
put
(
domain
+
"UrlResponse"
,
String
.
valueOf
(
urlDetail
.
getAvg
()));
}
TransactionType
serviceDetail
=
machine
.
getTypes
().
get
(
"Service"
);
if
(
serviceDetail
!=
null
)
{
data
.
put
(
domain
+
"ServiceTotal"
,
String
.
valueOf
(
serviceDetail
.
getTotalCount
()));
data
.
put
(
domain
+
"ServiceResponse"
,
String
.
valueOf
(
serviceDetail
.
getAvg
()));
}
if
(!
StringUtils
.
isEmpty
(
report
))
{
}
if
(
"transaction"
.
equalsIgnoreCase
(
report
))
{
}
TransactionReport
transactionReport
=
getTransactionHourlyReport
(
domain
,
ip
,
type
,
name
);
buildTransactionReportResult
(
transactionReport
,
ip
,
type
,
name
,
data
);
}
else
if
(
"event"
.
equalsIgnoreCase
(
report
))
{
EventReport
eventReport
=
getEventHourlyReport
(
domain
,
ip
,
type
);
buildEventReportResult
(
eventReport
,
ip
,
type
,
name
,
data
);
EventReport
eventReport
=
null
;
}
else
if
(
"problem"
.
equalsIgnoreCase
(
report
))
{
for
(
String
domain
:
domains
)
{
ProblemReport
problemReport
=
getProblemHourlyReport
(
domain
,
ip
);
eventReport
=
getEventHourlyReport
(
domain
);
buildProblemReportResult
(
problemReport
,
ip
,
type
,
name
,
data
);
com
.
dianping
.
cat
.
consumer
.
event
.
model
.
entity
.
Machine
machine
=
eventReport
.
getMachines
().
get
(
"All"
);
if
(
machine
!=
null
)
{
EventType
exceptionDetail
=
machine
.
getTypes
().
get
(
"Exception"
);
if
(
exceptionDetail
!=
null
)
{
data
.
put
(
domain
+
"Exception"
,
String
.
valueOf
(
exceptionDetail
.
getTotalCount
()));
}
}
}
else
{
Map
<
String
,
String
>
temp
=
getBaseInfoByDomian
(
domain
,
ip
);
data
.
putAll
(
temp
);
}
}
}
}
model
.
setData
(
m_gson
.
toJson
(
data
));
model
.
setData
(
new
Gson
()
.
toJson
(
data
));
m_jspViewer
.
view
(
ctx
,
model
);
m_jspViewer
.
view
(
ctx
,
model
);
}
}
}
}
cat-home/src/main/java/com/dianping/cat/report/page/dashboard/Payload.java
浏览文件 @
c1d9e900
package
com.dianping.cat.report.page.dashboard
;
package
com.dianping.cat.report.page.dashboard
;
import
org.apache.commons.lang.StringUtils
;
import
com.dianping.cat.report.ReportPage
;
import
com.dianping.cat.report.ReportPage
;
import
com.site.web.mvc.ActionContext
;
import
com.site.web.mvc.ActionContext
;
import
com.site.web.mvc.ActionPayload
;
import
com.site.web.mvc.ActionPayload
;
...
@@ -9,8 +11,25 @@ public class Payload implements ActionPayload<ReportPage, Action> {
...
@@ -9,8 +11,25 @@ public class Payload implements ActionPayload<ReportPage, Action> {
@FieldMeta
(
"op"
)
@FieldMeta
(
"op"
)
private
Action
m_action
;
private
Action
m_action
;
@FieldMeta
(
"report"
)
private
String
m_report
;
@FieldMeta
(
"domain"
)
private
String
m_domain
;
@FieldMeta
(
"type"
)
private
String
m_type
;
@FieldMeta
(
"name"
)
private
String
m_name
;
@FieldMeta
(
"ip"
)
private
String
m_ip
;
private
ReportPage
m_page
;
private
ReportPage
m_page
;
public
static
final
String
ALL
=
"All"
;
@Override
@Override
public
Action
getAction
()
{
public
Action
getAction
()
{
return
m_action
;
return
m_action
;
...
@@ -30,6 +49,49 @@ public class Payload implements ActionPayload<ReportPage, Action> {
...
@@ -30,6 +49,49 @@ public class Payload implements ActionPayload<ReportPage, Action> {
m_page
=
ReportPage
.
getByName
(
page
,
ReportPage
.
DASHBOARD
);
m_page
=
ReportPage
.
getByName
(
page
,
ReportPage
.
DASHBOARD
);
}
}
public
String
getReport
()
{
return
m_report
;
}
public
void
setReport
(
String
report
)
{
m_report
=
report
;
}
public
String
getDomain
()
{
return
m_domain
;
}
public
void
setDomain
(
String
domain
)
{
m_domain
=
domain
;
}
public
String
getType
()
{
return
m_type
;
}
public
void
setType
(
String
type
)
{
m_type
=
type
;
}
public
String
getName
()
{
return
m_name
;
}
public
void
setName
(
String
name
)
{
m_name
=
name
;
}
public
String
getIp
()
{
if
(
StringUtils
.
isEmpty
(
m_ip
))
{
return
ALL
;
}
return
m_ip
;
}
public
void
setIp
(
String
ip
)
{
m_ip
=
ip
;
}
@Override
@Override
public
void
validate
(
ActionContext
<?>
ctx
)
{
public
void
validate
(
ActionContext
<?>
ctx
)
{
if
(
m_action
==
null
)
{
if
(
m_action
==
null
)
{
...
...
cat-home/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
c1d9e900
...
@@ -1243,19 +1243,24 @@
...
@@ -1243,19 +1243,24 @@
<role>
com.dianping.cat.report.page.dashboard.Handler
</role>
<role>
com.dianping.cat.report.page.dashboard.Handler
</role>
<implementation>
com.dianping.cat.report.page.dashboard.Handler
</implementation>
<implementation>
com.dianping.cat.report.page.dashboard.Handler
</implementation>
<requirements>
<requirements>
<requirement>
<role>
com.dianping.cat.report.page.dashboard.JspViewer
</role>
</requirement>
<requirement>
<requirement>
<role>
com.dianping.cat.report.page.model.spi.ModelService
</role>
<role>
com.dianping.cat.report.page.model.spi.ModelService
</role>
<role-hint>
event
</role-hint>
<role-hint>
event
</role-hint>
<field-name>
m_eventService
</field-name>
<field-name>
m_eventService
</field-name>
</requirement>
</requirement>
<requirement>
<role>
com.dianping.cat.report.page.dashboard.JspViewer
</role>
</requirement>
<requirement>
<requirement>
<role>
com.dianping.cat.report.page.model.spi.ModelService
</role>
<role>
com.dianping.cat.report.page.model.spi.ModelService
</role>
<role-hint>
transaction
</role-hint>
<role-hint>
transaction
</role-hint>
<field-name>
m_transactionService
</field-name>
<field-name>
m_transactionService
</field-name>
</requirement>
</requirement>
<requirement>
<role>
com.dianping.cat.report.page.model.spi.ModelService
</role>
<role-hint>
problem
</role-hint>
<field-name>
m_problemService
</field-name>
</requirement>
</requirements>
</requirements>
</component>
</component>
<component>
<component>
...
...
cat-home/src/test/java/com/dianping/cat/report/page/transaction/PayloadTest.java
浏览文件 @
c1d9e900
...
@@ -87,26 +87,26 @@ public class PayloadTest {
...
@@ -87,26 +87,26 @@ public class PayloadTest {
payload
.
setStep
(-
1
);
payload
.
setStep
(-
1
);
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
current
,
payload
.
getHistoryEndDate
(
));
checkDate
(
current
,
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
lastTwo
,
payload
.
getHistoryStartDate
());
checkDate
(
lastTwo
,
payload
.
getHistoryStartDate
());
checkDate
(
lastOne
,
payload
.
getHistoryEndDate
(
));
checkDate
(
lastOne
,
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
setStep
(
1
);
payload
.
setStep
(
1
);
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
current
,
payload
.
getHistoryEndDate
(
));
checkDate
(
current
,
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
setStep
(
1
);
payload
.
setStep
(
1
);
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
current
,
payload
.
getHistoryStartDate
());
checkDate
(
current
,
payload
.
getHistoryStartDate
());
checkDate
(
next
,
payload
.
getHistoryEndDate
(
));
checkDate
(
next
,
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
setStep
(
1
);
payload
.
setStep
(
1
);
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
current
,
payload
.
getHistoryStartDate
());
checkDate
(
current
,
payload
.
getHistoryStartDate
());
checkDate
(
next
,
payload
.
getHistoryEndDate
(
));
checkDate
(
next
,
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
}
}
@Test
@Test
...
@@ -141,25 +141,25 @@ public class PayloadTest {
...
@@ -141,25 +141,25 @@ public class PayloadTest {
payload
.
setStep
(-
1
);
payload
.
setStep
(-
1
);
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
sdf
.
format
(
new
Date
(
lastOneWeek
.
getTime
()
+
7
*
ONE_DAY
)),
payload
.
getHistoryEndDate
(
));
checkDate
(
sdf
.
format
(
new
Date
(
lastOneWeek
.
getTime
()
+
7
*
ONE_DAY
)),
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
lastTwo
,
payload
.
getHistoryStartDate
());
checkDate
(
lastTwo
,
payload
.
getHistoryStartDate
());
checkDate
(
sdf
.
format
(
new
Date
(
lastTwoWeek
.
getTime
()
+
7
*
ONE_DAY
)),
payload
.
getHistoryEndDate
(
));
checkDate
(
sdf
.
format
(
new
Date
(
lastTwoWeek
.
getTime
()
+
7
*
ONE_DAY
)),
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
setStep
(
1
);
payload
.
setStep
(
1
);
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
sdf
.
format
(
new
Date
(
lastOneWeek
.
getTime
()
+
7
*
ONE_DAY
)),
payload
.
getHistoryEndDate
(
));
checkDate
(
sdf
.
format
(
new
Date
(
lastOneWeek
.
getTime
()
+
7
*
ONE_DAY
)),
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
computeStartDate
();
payload
.
computeStartDate
();
payload
.
setStep
(
1
);
payload
.
setStep
(
1
);
checkDate
(
current
,
payload
.
getHistoryStartDate
());
checkDate
(
current
,
payload
.
getHistoryStartDate
());
checkDate
(
sdf
.
format
(
currentWeek
.
getTime
()
+
7
*
ONE_DAY
),
payload
.
getHistoryEndDate
(
));
checkDate
(
sdf
.
format
(
currentWeek
.
getTime
()
+
7
*
ONE_DAY
),
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
current
,
payload
.
getHistoryStartDate
());
checkDate
(
current
,
payload
.
getHistoryStartDate
());
checkDate
(
sdf
.
format
(
currentWeek
.
getTime
()
+
7
*
ONE_DAY
),
payload
.
getHistoryEndDate
(
));
checkDate
(
sdf
.
format
(
currentWeek
.
getTime
()
+
7
*
ONE_DAY
),
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
}
}
@Test
@Test
...
@@ -187,15 +187,19 @@ public class PayloadTest {
...
@@ -187,15 +187,19 @@ public class PayloadTest {
payload
.
setStep
(-
1
);
payload
.
setStep
(-
1
);
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
current
,
payload
.
getHistoryEndDate
(
));
checkDate
(
current
,
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
lastTwo
,
payload
.
getHistoryStartDate
());
checkDate
(
lastTwo
,
payload
.
getHistoryStartDate
());
checkDate
(
lastOne
,
payload
.
getHistoryEndDate
(
));
checkDate
(
lastOne
,
adjustEndDate
(
payload
.
getHistoryEndDate
()
));
payload
.
setStep
(
1
);
payload
.
setStep
(
1
);
payload
.
computeStartDate
();
payload
.
computeStartDate
();
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
current
,
payload
.
getHistoryEndDate
());
checkDate
(
current
,
adjustEndDate
(
payload
.
getHistoryEndDate
()));
}
private
Date
adjustEndDate
(
Date
date
){
return
new
Date
(
date
.
getTime
()+
1000
);
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录