Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
c64d521f
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,发现更多精彩内容 >>
提交
c64d521f
编写于
12月 12, 2013
作者:
Y
youyong205
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modiy the cat dianping.jsp
上级
22bc4af5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
109 addition
and
90 deletion
+109
-90
cat-home/src/main/java/com/dianping/cat/report/page/statistics/Handler.java
...java/com/dianping/cat/report/page/statistics/Handler.java
+89
-89
cat-home/src/main/webapp/jsp/report/home/dianping.jsp
cat-home/src/main/webapp/jsp/report/home/dianping.jsp
+19
-0
cat-home/src/main/webapp/jsp/report/home/integratingDocument.jsp
...e/src/main/webapp/jsp/report/home/integratingDocument.jsp
+1
-1
未找到文件。
cat-home/src/main/java/com/dianping/cat/report/page/statistics/Handler.java
浏览文件 @
c64d521f
...
...
@@ -59,95 +59,6 @@ import com.dianping.cat.system.config.BugConfigManager;
import
com.dianping.cat.system.config.UtilizationConfigManager
;
public
class
Handler
implements
PageHandler
<
Context
>
{
public
class
BugReportVisitor
extends
BaseVisitor
{
private
Domain
m_currentDomain
;
private
Map
<
String
,
ErrorStatis
>
m_errors
=
new
HashMap
<
String
,
ErrorStatis
>();
public
ErrorStatis
findOrCreateErrorStatis
(
String
productLine
)
{
ErrorStatis
statis
=
m_errors
.
get
(
productLine
);
if
(
statis
==
null
)
{
statis
=
new
ErrorStatis
();
m_errors
.
put
(
productLine
,
statis
);
}
return
statis
;
}
public
Map
<
String
,
ErrorStatis
>
getErrors
()
{
return
m_errors
;
}
@Override
public
void
visitDomain
(
Domain
domain
)
{
m_currentDomain
=
domain
;
super
.
visitDomain
(
domain
);
}
@Override
public
void
visitExceptionItem
(
ExceptionItem
exceptionItem
)
{
String
exception
=
exceptionItem
.
getId
();
int
count
=
exceptionItem
.
getCount
();
Project
project
=
findProjectByDomain
(
m_currentDomain
.
getId
());
if
(
project
!=
null
)
{
String
productLine
=
project
.
getProjectLine
();
String
department
=
project
.
getDepartment
();
ErrorStatis
statis
=
findOrCreateErrorStatis
(
productLine
);
statis
.
setDepartment
(
department
);
statis
.
setProductLine
(
productLine
);
m_currentDomain
.
setDepartment
(
department
);
m_currentDomain
.
setProductLine
(
productLine
);
Map
<
String
,
ExceptionItem
>
items
=
null
;
if
(
isBug
(
m_currentDomain
.
getId
(),
exception
))
{
items
=
statis
.
getBugs
();
}
else
{
items
=
statis
.
getExceptions
();
}
ExceptionItem
item
=
items
.
get
(
exception
);
if
(
item
==
null
)
{
item
=
new
ExceptionItem
(
exception
);
item
.
setCount
(
count
);
item
.
getMessages
().
addAll
(
exceptionItem
.
getMessages
());
items
.
put
(
exception
,
item
);
}
else
{
List
<
String
>
messages
=
item
.
getMessages
();
item
.
setCount
(
item
.
getCount
()
+
count
);
messages
.
addAll
(
exceptionItem
.
getMessages
());
if
(
messages
.
size
()
>
10
)
{
messages
=
messages
.
subList
(
0
,
10
);
}
}
}
}
}
public
class
ClearBugReport
extends
BaseVisitor
{
@Override
public
void
visitDomain
(
Domain
domain
)
{
String
domainName
=
domain
.
getId
();
Set
<
String
>
removes
=
new
HashSet
<
String
>();
Map
<
String
,
ExceptionItem
>
items
=
domain
.
getExceptionItems
();
for
(
ExceptionItem
item
:
items
.
values
())
{
if
(!
isBug
(
domainName
,
item
.
getId
()))
{
removes
.
add
(
item
.
getId
());
}
}
for
(
String
remove
:
removes
)
{
items
.
remove
(
remove
);
}
}
}
@Inject
private
JspViewer
m_jspViewer
;
...
...
@@ -531,5 +442,94 @@ public class Handler implements PageHandler<Context> {
temp
.
setExceptions
(
MapUtils
.
sortMap
(
exceptions
,
compator
));
}
return
errors
;
}
public
class
BugReportVisitor
extends
BaseVisitor
{
private
Domain
m_currentDomain
;
private
Map
<
String
,
ErrorStatis
>
m_errors
=
new
HashMap
<
String
,
ErrorStatis
>();
public
ErrorStatis
findOrCreateErrorStatis
(
String
productLine
)
{
ErrorStatis
statis
=
m_errors
.
get
(
productLine
);
if
(
statis
==
null
)
{
statis
=
new
ErrorStatis
();
m_errors
.
put
(
productLine
,
statis
);
}
return
statis
;
}
public
Map
<
String
,
ErrorStatis
>
getErrors
()
{
return
m_errors
;
}
@Override
public
void
visitDomain
(
Domain
domain
)
{
m_currentDomain
=
domain
;
super
.
visitDomain
(
domain
);
}
@Override
public
void
visitExceptionItem
(
ExceptionItem
exceptionItem
)
{
String
exception
=
exceptionItem
.
getId
();
int
count
=
exceptionItem
.
getCount
();
Project
project
=
findProjectByDomain
(
m_currentDomain
.
getId
());
if
(
project
!=
null
)
{
String
productLine
=
project
.
getProjectLine
();
String
department
=
project
.
getDepartment
();
ErrorStatis
statis
=
findOrCreateErrorStatis
(
productLine
);
statis
.
setDepartment
(
department
);
statis
.
setProductLine
(
productLine
);
m_currentDomain
.
setDepartment
(
department
);
m_currentDomain
.
setProductLine
(
productLine
);
Map
<
String
,
ExceptionItem
>
items
=
null
;
if
(
isBug
(
m_currentDomain
.
getId
(),
exception
))
{
items
=
statis
.
getBugs
();
}
else
{
items
=
statis
.
getExceptions
();
}
ExceptionItem
item
=
items
.
get
(
exception
);
if
(
item
==
null
)
{
item
=
new
ExceptionItem
(
exception
);
item
.
setCount
(
count
);
item
.
getMessages
().
addAll
(
exceptionItem
.
getMessages
());
items
.
put
(
exception
,
item
);
}
else
{
List
<
String
>
messages
=
item
.
getMessages
();
item
.
setCount
(
item
.
getCount
()
+
count
);
messages
.
addAll
(
exceptionItem
.
getMessages
());
if
(
messages
.
size
()
>
10
)
{
messages
=
messages
.
subList
(
0
,
10
);
}
}
}
}
}
public
class
ClearBugReport
extends
BaseVisitor
{
@Override
public
void
visitDomain
(
Domain
domain
)
{
String
domainName
=
domain
.
getId
();
Set
<
String
>
removes
=
new
HashSet
<
String
>();
Map
<
String
,
ExceptionItem
>
items
=
domain
.
getExceptionItems
();
for
(
ExceptionItem
item
:
items
.
values
())
{
if
(!
isBug
(
domainName
,
item
.
getId
()))
{
removes
.
add
(
item
.
getId
());
}
}
for
(
String
remove
:
removes
)
{
items
.
remove
(
remove
);
}
}
}
}
cat-home/src/main/webapp/jsp/report/home/dianping.jsp
浏览文件 @
c64d521f
<%@ page
session=
"false"
language=
"java"
pageEncoding=
"UTF-8"
%>
</br>
<h4
class=
"text-error"
>
CAT QA环境机器调整通知
</h4>
1、线下的CAT的环境是一台虚拟机(ip:192.168.7.70),无法满足线下的需求,目前已经正式替换为一台物理机。
</br>
2、目前现有机器上/data/appdatas/cat/client.xml需要重新配置。
</br>
3、Beta的环境我们会和OPS统一进行替换,Alpha环境我们后续会尝试统一修改。
</br>
4、如果是dev或者Alpha机器并使用到CAT,请手动修改此文件,需要将192.168.7.70替换为192.168.213.115
</br>
<xmp>
<config
mode=
"client"
>
<servers>
<server
ip=
"192.168.213.115"
port=
"2280"
/>
</servers>
<domain
id=
"MobileApi"
enabled=
"true"
/>
</config>
</xmp>
</br>
<h4
class=
"text-error"
>
CAT监控内部
</h4>
<div>
...
...
cat-home/src/main/webapp/jsp/report/home/integratingDocument.jsp
浏览文件 @
c64d521f
...
...
@@ -88,7 +88,7 @@
<xmp>
<config
mode=
"client"
>
<servers>
<server
ip=
"192.168.
7.70
"
port=
"2280"
/>
<server
ip=
"192.168.
213.115
"
port=
"2280"
/>
</servers>
<domain
id=
"MobileApi"
enabled=
"true"
/>
</config>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录