Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
fdc133be
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,发现更多精彩内容 >>
提交
fdc133be
编写于
6月 16, 2015
作者:
Y
youyong205
浏览文件
操作
浏览文件
下载
差异文件
fix bug
上级
d6625a8b
0e17734b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
26 deletion
+18
-26
cat-consumer/src/main/java/com/dianping/cat/consumer/storage/StorageReportUpdater.java
...m/dianping/cat/consumer/storage/StorageReportUpdater.java
+15
-17
cat-home/src/main/java/com/dianping/cat/system/page/config/Model.java
.../main/java/com/dianping/cat/system/page/config/Model.java
+1
-7
cat-home/src/main/webapp/jsp/system/appConfig/code.jsp
cat-home/src/main/webapp/jsp/system/appConfig/code.jsp
+2
-2
未找到文件。
cat-consumer/src/main/java/com/dianping/cat/consumer/storage/StorageReportUpdater.java
浏览文件 @
fdc133be
...
...
@@ -5,10 +5,8 @@ import java.util.Set;
import
com.dianping.cat.consumer.storage.model.entity.Domain
;
import
com.dianping.cat.consumer.storage.model.entity.Operation
;
import
com.dianping.cat.consumer.storage.model.entity.Segment
;
import
com.dianping.cat.consumer.storage.model.entity.Sql
;
import
com.dianping.cat.consumer.storage.model.entity.StorageReport
;
import
com.dianping.cat.message.Transaction
;
import
com.site.lookup.util.StringUtils
;
public
class
StorageReportUpdater
{
...
...
@@ -58,21 +56,21 @@ public class StorageReportUpdater {
}
}
protected
void
updateSqlInfo
(
StorageUpdateParam
param
,
Domain
d
)
{
String
sqlName
=
param
.
getSqlName
();
if
(
StringUtils
.
isNotEmpty
(
sqlName
))
{
Sql
sql
=
d
.
findOrCreateSql
(
sqlName
);
String
sqlStatement
=
sql
.
getStatement
();
if
(
StringUtils
.
isEmpty
(
sqlStatement
))
{
sqlStatement
=
sqlStatement
.
replaceAll
(
"<"
,
"<"
).
replaceAll
(
">"
,
">"
);
sql
.
setStatement
(
sqlStatement
);
}
sql
.
incCount
();
}
}
// private
void updateSqlInfo(StorageUpdateParam param, Domain d) {
//
String sqlName = param.getSqlName();
//
//
if (StringUtils.isNotEmpty(sqlName)) {
//
Sql sql = d.findOrCreateSql(sqlName);
//
String sqlStatement = sql.getStatement();
//
//
if (StringUtils.isEmpty(sqlStatement)) {
//
sqlStatement = sqlStatement.replaceAll("<", "<").replaceAll(">", ">");
//
//
sql.setStatement(sqlStatement);
//
}
//
sql.incCount();
//
}
//
}
public
static
class
StorageUpdateParam
{
...
...
cat-home/src/main/java/com/dianping/cat/system/page/config/Model.java
浏览文件 @
fdc133be
...
...
@@ -4,7 +4,6 @@ import java.util.ArrayList;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -12,7 +11,6 @@ import org.unidal.lookup.ContainerLoader;
import
org.unidal.web.mvc.ViewModel
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Constants
;
import
com.dianping.cat.config.app.AppConfigManager
;
import
com.dianping.cat.configuration.app.entity.Code
;
import
com.dianping.cat.configuration.app.entity.Command
;
...
...
@@ -270,11 +268,7 @@ public class Model extends ViewModel<SystemPage, Action, Context> {
}
public
String
getDomain2CommandsJson
()
{
Map
<
String
,
List
<
Command
>>
results
=
new
LinkedHashMap
<
String
,
List
<
Command
>>();
results
.
put
(
Constants
.
ALL
,
m_appConfigManager
.
queryCommands
());
results
.
putAll
(
m_appConfigManager
.
queryDomain2Commands
());
return
new
JsonBuilder
().
toJson
(
results
);
return
new
JsonBuilder
().
toJson
(
m_appConfigManager
.
queryDomain2Commands
());
}
public
DomainConfig
getDomainConfig
()
{
...
...
cat-home/src/main/webapp/jsp/system/appConfig/code.jsp
浏览文件 @
fdc133be
...
...
@@ -22,7 +22,7 @@
commandSelect
.
empty
();
for
(
var
cou
in
commands
){
var
command
=
commands
[
cou
];
if
(
command
[
'
title
'
]
!=
undefined
&&
command
[
'
title
'
].
length
>
0
){
if
(
command
[
'
title
'
]
!=
undefined
&&
command
[
'
title
'
].
trim
().
length
>
0
){
commandSelect
.
append
(
$
(
"
<option value='
"
+
command
[
'
id
'
]
+
"
'>
"
+
command
[
'
title
'
]
+
"
</option>
"
));
}
else
{
commandSelect
.
append
(
$
(
"
<option value='
"
+
command
[
'
id
'
]
+
"
'>
"
+
command
[
'
name
'
]
+
"
</option>
"
));
...
...
@@ -41,7 +41,7 @@
for
(
var
cou
in
commands
){
var
command
=
commands
[
cou
];
if
(
command
[
'
title
'
]
!=
undefined
){
if
(
command
[
'
title
'
]
!=
undefined
&&
command
[
'
title
'
].
trim
().
length
>
0
){
commandSelect
.
append
(
$
(
"
<option value='
"
+
command
[
'
id
'
]
+
"
'>
"
+
command
[
'
title
'
]
+
"
</option>
"
));
}
else
{
commandSelect
.
append
(
$
(
"
<option value='
"
+
command
[
'
id
'
]
+
"
'>
"
+
command
[
'
name
'
]
+
"
</option>
"
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录