Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
6a03e287
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,发现更多精彩内容 >>
提交
6a03e287
编写于
3月 20, 2014
作者:
L
leon.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify alteration page
上级
ac84b0c8
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
214 addition
and
39 deletion
+214
-39
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Handler.java
...java/com/dianping/cat/report/page/alteration/Handler.java
+34
-1
cat-home/src/main/java/com/dianping/cat/report/page/alteration/JspFile.java
...java/com/dianping/cat/report/page/alteration/JspFile.java
+2
-2
cat-home/src/main/java/com/dianping/cat/report/page/alteration/JspViewer.java
...va/com/dianping/cat/report/page/alteration/JspViewer.java
+2
-0
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Model.java
...n/java/com/dianping/cat/report/page/alteration/Model.java
+11
-0
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Payload.java
...java/com/dianping/cat/report/page/alteration/Payload.java
+140
-30
cat-home/src/main/resources/META-INF/plexus/components.xml
cat-home/src/main/resources/META-INF/plexus/components.xml
+25
-6
cat-home/src/main/webapp/jsp/report/alteration/alter_view.jsp
...home/src/main/webapp/jsp/report/alteration/alter_view.jsp
+0
-0
未找到文件。
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Handler.java
浏览文件 @
6a03e287
...
...
@@ -5,6 +5,7 @@ import java.io.IOException;
import
javax.servlet.ServletException
;
import
com.dianping.cat.report.ReportPage
;
import
org.unidal.lookup.annotation.Inject
;
import
org.unidal.web.mvc.PageHandler
;
import
org.unidal.web.mvc.annotation.InboundActionMeta
;
...
...
@@ -26,8 +27,40 @@ public class Handler implements PageHandler<Context> {
@OutboundActionMeta
(
name
=
"alteration"
)
public
void
handleOutbound
(
Context
ctx
)
throws
ServletException
,
IOException
{
Model
model
=
new
Model
(
ctx
);
Payload
payload
=
ctx
.
getPayload
();
Action
action
=
payload
.
getAction
();
String
type
=
payload
.
getType
();
String
title
=
payload
.
getTitle
();
String
domain
=
payload
.
getDomain
();
String
ip
=
payload
.
getIp
();
String
user
=
payload
.
getUser
();
switch
(
action
){
case
INSERT:
String
content
=
payload
.
getContent
();
String
url
=
payload
.
getUrl
();
/*Alteration alt = new Alteration();
try {
return m_projectDao.findByDomain(domain, ProjectEntity.READSET_FULL);
} catch (DalException e) {
Cat.logError(e);
}*/
model
.
setStatus
(
"{\"status\":\"success\"}"
);
model
.
setStatus
(
"{\"status\":\"fail\"}"
);
break
;
case
VIEW:
String
startTime
=
payload
.
getStartTime
();
String
endTime
=
payload
.
getEndTime
();
long
granularity
=
payload
.
getGranularity
();
//model.setResult(m_manager.getEmailPassword()+ " action2 " + domain+" " +ip);
break
;
}
model
.
setAction
(
Action
.
VIEW
);
model
.
setAction
(
action
);
model
.
setPage
(
ReportPage
.
ALTERATION
);
if
(!
ctx
.
isProcessStopped
())
{
...
...
cat-home/src/main/java/com/dianping/cat/report/page/alteration/JspFile.java
浏览文件 @
6a03e287
package
com.dianping.cat.report.page.alteration
;
public
enum
JspFile
{
VIEW
(
"/jsp/report/alteration
.jsp"
),
INSERT
(
"/jsp/report/alteration/alter_insertResult
.jsp"
),
VIEW
(
"/jsp/report/alteration/alter_view.jsp"
),
;
private
String
m_path
;
...
...
cat-home/src/main/java/com/dianping/cat/report/page/alteration/JspViewer.java
浏览文件 @
6a03e287
...
...
@@ -9,6 +9,8 @@ public class JspViewer extends BaseJspViewer<ReportPage, Action, Context, Model>
Action
action
=
model
.
getAction
();
switch
(
action
)
{
case
INSERT:
return
JspFile
.
INSERT
.
getPath
();
case
VIEW:
return
JspFile
.
VIEW
.
getPath
();
}
...
...
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Model.java
浏览文件 @
6a03e287
...
...
@@ -4,6 +4,17 @@ import com.dianping.cat.report.ReportPage;
import
org.unidal.web.mvc.ViewModel
;
public
class
Model
extends
ViewModel
<
ReportPage
,
Action
,
Context
>
{
private
String
m_status
;
public
String
getStatus
()
{
return
m_status
;
}
public
void
setStatus
(
String
status
)
{
this
.
m_status
=
status
;
}
public
Model
(
Context
ctx
)
{
super
(
ctx
);
}
...
...
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Payload.java
浏览文件 @
6a03e287
...
...
@@ -6,34 +6,144 @@ import org.unidal.web.mvc.ActionPayload;
import
org.unidal.web.mvc.payload.annotation.FieldMeta
;
public
class
Payload
implements
ActionPayload
<
ReportPage
,
Action
>
{
private
ReportPage
m_page
;
@FieldMeta
(
"op"
)
private
Action
m_action
;
public
void
setAction
(
String
action
)
{
m_action
=
Action
.
getByName
(
action
,
Action
.
VIEW
);
}
@Override
public
Action
getAction
()
{
return
m_action
;
}
@Override
public
ReportPage
getPage
()
{
return
m_page
;
}
@Override
public
void
setPage
(
String
page
)
{
m_page
=
ReportPage
.
getByName
(
page
,
ReportPage
.
ALTERATION
);
}
@Override
public
void
validate
(
ActionContext
<?>
ctx
)
{
if
(
m_action
==
null
)
{
m_action
=
Action
.
VIEW
;
}
}
private
ReportPage
m_page
;
@FieldMeta
(
"op"
)
private
Action
m_action
;
@FieldMeta
(
"type"
)
private
String
m_type
;
@FieldMeta
(
"title"
)
private
String
m_title
;
@FieldMeta
(
"domain"
)
private
String
m_domain
;
@FieldMeta
(
"ip"
)
private
String
m_ip
;
@FieldMeta
(
"user"
)
private
String
m_user
;
@FieldMeta
(
"content"
)
private
String
m_content
;
@FieldMeta
(
"url"
)
private
String
m_url
;
@FieldMeta
(
"startTime"
)
private
String
m_startTime
;
@FieldMeta
(
"endTime"
)
private
String
m_endTime
;
@FieldMeta
(
"granularity"
)
private
long
m_granularity
;
public
String
getStartTime
()
{
return
m_startTime
;
}
public
String
getType
()
{
return
m_type
;
}
public
void
setType
(
String
type
)
{
this
.
m_type
=
type
;
}
public
String
getTitle
()
{
return
m_title
;
}
public
void
setTitle
(
String
title
)
{
this
.
m_title
=
title
;
}
public
String
getDomain
()
{
return
m_domain
;
}
public
void
setDomain
(
String
domain
)
{
this
.
m_domain
=
domain
;
}
public
String
getIp
()
{
return
m_ip
;
}
public
void
setIp
(
String
ip
)
{
this
.
m_ip
=
ip
;
}
public
String
getUser
()
{
return
m_user
;
}
public
void
setUser
(
String
user
)
{
this
.
m_user
=
user
;
}
public
String
getContent
()
{
return
m_content
;
}
public
void
setContent
(
String
content
)
{
this
.
m_content
=
content
;
}
public
String
getUrl
()
{
return
m_url
;
}
public
void
setUrl
(
String
url
)
{
this
.
m_url
=
url
;
}
public
void
setStartTime
(
String
m_startTime
)
{
this
.
m_startTime
=
m_startTime
;
}
public
String
getEndTime
()
{
return
m_endTime
;
}
public
void
setEndTime
(
String
m_endTime
)
{
this
.
m_endTime
=
m_endTime
;
}
public
long
getGranularity
()
{
return
m_granularity
;
}
public
void
setGranularity
(
long
m_granularity
)
{
this
.
m_granularity
=
m_granularity
;
}
public
void
setAction
(
String
action
)
{
m_action
=
Action
.
getByName
(
action
,
Action
.
VIEW
);
}
@Override
public
Action
getAction
()
{
return
m_action
;
}
@Override
public
ReportPage
getPage
()
{
return
m_page
;
}
@Override
public
void
setPage
(
String
page
)
{
m_page
=
ReportPage
.
getByName
(
page
,
ReportPage
.
ALTERATION
);
}
@Override
public
void
validate
(
ActionContext
<?>
ctx
)
{
if
(
m_action
==
null
)
{
m_action
=
Action
.
VIEW
;
}
}
}
cat-home/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
6a03e287
...
...
@@ -1499,6 +1499,16 @@
</requirement>
</requirements>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
alteration
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
alteration
</logical-table-name>
<physical-table-name>
alteration
</physical-table-name>
<data-source-name>
cat
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
baseline
</role-hint>
...
...
@@ -1569,6 +1579,15 @@
<data-source-name>
cat
</data-source-name>
</configuration>
</component>
<component>
<role>
com.dianping.cat.home.dal.report.AlterationDao
</role>
<implementation>
com.dianping.cat.home.dal.report.AlterationDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.home.dal.report.BaselineDao
</role>
<implementation>
com.dianping.cat.home.dal.report.BaselineDao
</implementation>
...
...
@@ -2863,20 +2882,20 @@
</requirements>
</component>
<component>
<role>
com.dianping.cat.report.page.
alteration.Handl
er
</role>
<implementation>
com.dianping.cat.report.page.
alteration.Handl
er
</implementation>
<role>
com.dianping.cat.report.page.
systemMonitor.JspView
er
</role>
<implementation>
com.dianping.cat.report.page.
systemMonitor.JspView
er
</implementation>
<requirements>
<requirement>
<role>
com.dianping.cat.report.page.alteration.JspView
er
</role>
<role>
org.unidal.web.mvc.view.model.ModelHandl
er
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.report.page.
systemMonitor.JspView
er
</role>
<implementation>
com.dianping.cat.report.page.
systemMonitor.JspView
er
</implementation>
<role>
com.dianping.cat.report.page.
alteration.Handl
er
</role>
<implementation>
com.dianping.cat.report.page.
alteration.Handl
er
</implementation>
<requirements>
<requirement>
<role>
org.unidal.web.mvc.view.model.ModelHandl
er
</role>
<role>
com.dianping.cat.report.page.alteration.JspView
er
</role>
</requirement>
</requirements>
</component>
...
...
cat-home/src/main/webapp/jsp/report/alteration.jsp
→
cat-home/src/main/webapp/jsp/report/alteration
/alter_view
.jsp
浏览文件 @
6a03e287
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录