Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
25ddf239
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,发现更多精彩内容 >>
提交
25ddf239
编写于
10月 18, 2013
作者:
Y
yong.you
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sort the code
上级
01ea985d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
67 addition
and
67 deletion
+67
-67
cat-home/src/main/java/com/dianping/cat/report/page/metric/Action.java
...main/java/com/dianping/cat/report/page/metric/Action.java
+6
-6
cat-home/src/main/java/com/dianping/cat/report/page/metric/Model.java
.../main/java/com/dianping/cat/report/page/metric/Model.java
+22
-22
cat-home/src/main/java/com/dianping/cat/report/page/metric/Payload.java
...ain/java/com/dianping/cat/report/page/metric/Payload.java
+27
-27
cat-home/src/main/java/com/dianping/cat/report/page/metric/Range.java
.../main/java/com/dianping/cat/report/page/metric/Range.java
+12
-12
未找到文件。
cat-home/src/main/java/com/dianping/cat/report/page/metric/Action.java
浏览文件 @
25ddf239
...
...
@@ -5,6 +5,12 @@ public enum Action implements org.unidal.web.mvc.Action {
DASHBOARD
(
"dashboard"
);
private
String
m_name
;
private
Action
(
String
name
)
{
m_name
=
name
;
}
public
static
Action
getByName
(
String
name
,
Action
defaultAction
)
{
for
(
Action
action
:
Action
.
values
())
{
if
(
action
.
getName
().
equals
(
name
))
{
...
...
@@ -15,12 +21,6 @@ public enum Action implements org.unidal.web.mvc.Action {
return
defaultAction
;
}
private
String
m_name
;
private
Action
(
String
name
)
{
m_name
=
name
;
}
@Override
public
String
getName
()
{
return
m_name
;
...
...
cat-home/src/main/java/com/dianping/cat/report/page/metric/Model.java
浏览文件 @
25ddf239
...
...
@@ -29,14 +29,18 @@ public class Model extends AbstractReportModel<Action, Context> {
private
Map
<
Integer
,
Abtest
>
m_abtests
;
public
Range
[]
getAllRange
()
{
return
Range
.
values
();
}
public
Model
(
Context
ctx
)
{
super
(
ctx
);
}
public
Map
<
Integer
,
Abtest
>
getAbtests
()
{
return
m_abtests
;
}
public
Range
[]
getAllRange
()
{
return
Range
.
values
();
}
@Override
public
Action
getDefaultAction
()
{
return
Action
.
METRIC
;
...
...
@@ -52,44 +56,40 @@ public class Model extends AbstractReportModel<Action, Context> {
return
new
HashSet
<
String
>();
}
public
Collection
<
ProductLine
>
getProductLines
()
{
return
m_productLines
;
}
public
void
setProductLines
(
Collection
<
ProductLine
>
productLines
)
{
m_productLines
=
productLines
;
public
Date
getEndTime
()
{
return
m_endTime
;
}
public
List
<
LineChart
>
getLineCharts
()
{
return
m_lineCharts
;
}
public
void
setLineCharts
(
List
<
LineChart
>
lineCharts
)
{
m_lineCharts
=
lineChart
s
;
public
Collection
<
ProductLine
>
getProductLines
(
)
{
return
m_productLine
s
;
}
public
Date
getStartTime
()
{
return
m_startTime
;
}
public
void
setStartTime
(
Date
startTime
)
{
m_startTime
=
startTime
;
}
public
Date
getEndTime
()
{
return
m_endTime
;
public
void
setAbtests
(
Map
<
Integer
,
Abtest
>
abtests
)
{
m_abtests
=
abtests
;
}
public
void
setEndTime
(
Date
endTime
)
{
m_endTime
=
endTime
;
}
public
void
set
Abtests
(
Map
<
Integer
,
Abtest
>
abtes
ts
)
{
m_
abtests
=
abtes
ts
;
public
void
set
LineCharts
(
List
<
LineChart
>
lineChar
ts
)
{
m_
lineCharts
=
lineChar
ts
;
}
public
Map
<
Integer
,
Abtest
>
getAbtests
()
{
return
m_abtests
;
public
void
setProductLines
(
Collection
<
ProductLine
>
productLines
)
{
m_productLines
=
productLines
;
}
public
void
setStartTime
(
Date
startTime
)
{
m_startTime
=
startTime
;
}
}
cat-home/src/main/java/com/dianping/cat/report/page/metric/Payload.java
浏览文件 @
25ddf239
...
...
@@ -39,64 +39,64 @@ public class Payload extends AbstractReportPayload<Action> {
return
m_action
;
}
@Override
public
ReportPage
getPage
()
{
return
m_page
;
}
public
void
setAction
(
String
action
)
{
m_action
=
Action
.
getByName
(
action
,
Action
.
METRIC
);
public
int
getFrequency
()
{
return
m_frequency
;
}
@Override
public
void
setPage
(
String
page
)
{
m_page
=
ReportPage
.
getByName
(
page
,
ReportPage
.
METRIC
)
;
public
ReportPage
getPage
(
)
{
return
m_page
;
}
public
String
getProduct
()
{
return
m_product
;
}
public
void
setProduct
(
String
product
)
{
m_product
=
product
;
}
public
String
getTest
()
{
return
m_test
;
}
public
void
setTest
(
String
test
)
{
m_test
=
test
;
}
public
int
getTimeRange
()
{
return
m_timeRange
;
}
public
int
getFrequency
()
{
return
m_frequency
;
}
public
void
setFrequency
(
int
frequency
)
{
m_frequency
=
frequency
;
public
boolean
isFullScreen
()
{
return
m_fullScreen
;
}
public
boolean
isRefresh
()
{
return
m_refresh
;
}
public
void
set
Refresh
(
boolean
refresh
)
{
m_
refresh
=
refresh
;
public
void
set
Action
(
String
action
)
{
m_
action
=
Action
.
getByName
(
action
,
Action
.
METRIC
)
;
}
public
boolean
isFullScreen
(
)
{
return
m_fullScreen
;
public
void
setFrequency
(
int
frequency
)
{
m_frequency
=
frequency
;
}
public
void
setFullScreen
(
boolean
fullScreen
)
{
m_fullScreen
=
fullScreen
;
}
@Override
public
void
setPage
(
String
page
)
{
m_page
=
ReportPage
.
getByName
(
page
,
ReportPage
.
METRIC
);
}
public
void
setProduct
(
String
product
)
{
m_product
=
product
;
}
public
void
setRefresh
(
boolean
refresh
)
{
m_refresh
=
refresh
;
}
public
void
setTest
(
String
test
)
{
m_test
=
test
;
}
@Override
public
void
validate
(
ActionContext
<?>
ctx
)
{
if
(
m_action
==
null
)
{
...
...
cat-home/src/main/java/com/dianping/cat/report/page/metric/Range.java
浏览文件 @
25ddf239
...
...
@@ -13,23 +13,15 @@ public enum Range {
ONE_DAY
(
"24小时"
,
24
),
;
private
String
m_title
;
private
int
m_duration
;
private
Range
(
String
title
,
int
duration
)
{
m_title
=
title
;
m_duration
=
duration
;
}
public
String
getTitle
()
{
return
m_title
;
}
public
int
getDuration
()
{
return
m_duration
;
}
private
String
m_title
;
private
int
m_duration
;
public
static
Range
getByTitle
(
String
title
,
Range
defaultRange
)
{
for
(
Range
range
:
Range
.
values
())
{
if
(
range
.
getTitle
().
equals
(
title
))
{
...
...
@@ -38,4 +30,12 @@ public enum Range {
}
return
defaultRange
;
}
public
int
getDuration
()
{
return
m_duration
;
}
public
String
getTitle
()
{
return
m_title
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录