Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
8b8c3f5c
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,发现更多精彩内容 >>
提交
8b8c3f5c
编写于
6月 04, 2014
作者:
J
jialinsun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean before code
上级
6b85a669
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
3 addition
and
194 deletion
+3
-194
cat-core/src/main/resources/META-INF/wizard/jdbc/wizard.xml
cat-core/src/main/resources/META-INF/wizard/jdbc/wizard.xml
+1
-1
cat-core/src/test/java/com/dianping/cat/core/AllTests.java
cat-core/src/test/java/com/dianping/cat/core/AllTests.java
+0
-15
cat-home/src/main/java/com/dianping/cat/report/page/metric/Handler.java
...ain/java/com/dianping/cat/report/page/metric/Handler.java
+1
-0
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.xml
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.xml
+1
-2
cat-home/src/main/webapp/jsp/report/system/system.jsp
cat-home/src/main/webapp/jsp/report/system/system.jsp
+0
-139
cat-home/src/main/webapp/jsp/report/system/systemOpNav.jsp
cat-home/src/main/webapp/jsp/report/system/systemOpNav.jsp
+0
-37
未找到文件。
cat-core/src/main/resources/META-INF/wizard/jdbc/wizard.xml
浏览文件 @
8b8c3f5c
...
...
@@ -5,7 +5,7 @@
<driver>
com.mysql.jdbc.Driver
</driver>
<url>
jdbc:mysql://127.0.0.1:3306/cat
</url>
<user>
root
</user>
<password></password>
<password>
password
</password>
<properties>
useUnicode=true
&
autoReconnect=true
</properties>
</datasource>
<group
name=
"report"
package=
"com.dianping.cat.core.dal"
>
...
...
cat-core/src/test/java/com/dianping/cat/core/AllTests.java
已删除
100644 → 0
浏览文件 @
6b85a669
package
com.dianping.cat.core
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
// add test classes here
})
public
class
AllTests
{
}
cat-home/src/main/java/com/dianping/cat/report/page/metric/Handler.java
浏览文件 @
8b8c3f5c
...
...
@@ -60,6 +60,7 @@ public class Handler implements PageHandler<Context> {
switch
(
payload
.
getAction
())
{
case
METRIC:
Map
<
String
,
LineChart
>
charts
=
m_graphCreator
.
buildChartsByProductLine
(
payload
.
getProduct
(),
start
,
end
);
model
.
setLineCharts
(
new
ArrayList
<
LineChart
>(
charts
.
values
()));
break
;
case
DASHBOARD:
...
...
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.xml
浏览文件 @
8b8c3f5c
...
...
@@ -5,7 +5,7 @@
<driver>
com.mysql.jdbc.Driver
</driver>
<url>
jdbc:mysql://127.0.0.1:3306/cat
</url>
<user>
root
</user>
<password></password>
<password>
password
</password>
<properties>
useUnicode=true
&
autoReconnect=true
</properties>
</datasource>
<group
name=
"report"
package=
"com.dianping.cat.home.dal.report"
>
...
...
@@ -16,7 +16,6 @@
<table
name=
"daily_report_content"
/>
<table
name=
"monthly_report_content"
/>
<table
name=
"weekly_report_content"
/>
<table
name=
"project"
/>
</group>
<group
name=
"alarm"
package=
"com.dianping.cat.home.dal.alarm"
>
<table
name=
"mailRecord"
/>
...
...
cat-home/src/main/webapp/jsp/report/system/system.jsp
已删除
100644 → 0
浏览文件 @
6b85a669
<%@ page
contentType=
"text/html; charset=utf-8"
%>
<%@ taglib
prefix=
"a"
uri=
"/WEB-INF/app.tld"
%>
<%@ taglib
prefix=
"w"
uri=
"http://www.unidal.org/web/core"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"res"
uri=
"http://www.unidal.org/webres"
%>
<jsp:useBean
id=
"ctx"
type=
"com.dianping.cat.report.page.system.Context"
scope=
"request"
/>
<jsp:useBean
id=
"payload"
type=
"com.dianping.cat.report.page.system.Payload"
scope=
"request"
/>
<jsp:useBean
id=
"model"
type=
"com.dianping.cat.report.page.system.Model"
scope=
"request"
/>
<res:bean
id=
"res"
/>
<res:useCss
value=
'
${
res
.
css
.
local
.
body_css
}
'
target=
"head-css"
/>
<res:useCss
value=
"
${
res
.
css
.
local
[
'bootstrap.css'
]
}
"
target=
"head-css"
/>
<res:useJs
value=
"
${
res
.
js
.
local
[
'jquery-1.7.1.js'
]
}
"
target=
"head-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
[
'bootstrap.min.js'
]
}
"
target=
"head-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
[
'highcharts.js'
]
}
"
target=
"head-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
[
'baseGraph.js'
]
}
"
target=
"head-js"
/>
<c:choose>
<c:when
test=
"
${
payload
.
fullScreen
}
"
>
<a
href=
"javascript:showOpNav()"
id=
"switch"
class=
"btn btn-small btn-success"
>
隐藏
</a>
<div
class=
"opNav"
>
<%@ include
file=
"systemOpNav.jsp"
%>
<table>
<tr
style=
"text-align: left"
>
<th>
时间段选择:
<c:forEach
var=
"range"
items=
"
${
model
.
allRange
}
"
>
<c:choose>
<c:when
test=
"
${
payload
.
timeRange
eq
range
.
duration
}
"
>
[
<a
href=
"?op=view&${navUrlPrefix}&fullScreen=${payload.fullScreen}&date=${model.date}&domain=${model.domain}&product=${payload.product}&timeRange=${range.duration}"
class=
"current"
>
${range.title}
</a>
]
</c:when>
<c:otherwise>
[
<a
href=
"?op=view&${navUrlPrefix}&fullScreen=${payload.fullScreen}&date=${model.date}&domain=${model.domain}&product=${payload.product}&timeRange=${range.duration}"
>
${range.title}
</a>
]
</c:otherwise>
</c:choose>
</c:forEach>
</th>
</tr>
</table></div>
<c:forEach
var=
"item"
items=
"
${
model
.
lineCharts
}
"
varStatus=
"status"
>
<div
style=
"float:left;"
>
<div
id=
"${item.id}"
class=
"metricGraph"
></div>
</div>
</c:forEach>
</c:when>
<c:otherwise>
<a:report
title=
"Dependency Report"
navUrlPrefix=
"domain=${model.domain}"
>
<jsp:attribute
name=
"subtitle"
>
From ${w:format(model.startTime,'yyyy-MM-dd HH:mm:ss')} to ${w:format(model.endTime,'yyyy-MM-dd HH:mm:ss')}
</jsp:attribute>
<jsp:body>
<%@ include
file=
"systemOpNav.jsp"
%>
<table>
<tr
style=
"text-align: left"
>
<th>
时间段选择:
<c:forEach
var=
"range"
items=
"
${
model
.
allRange
}
"
>
<c:choose>
<c:when
test=
"
${
payload
.
timeRange
eq
range
.
duration
}
"
>
[
<a
href=
"?op=view&date=${model.date}&domain=${model.domain}&product=${payload.product}&timeRange=${range.duration}"
class=
"current"
>
${range.title}
</a>
]
</c:when>
<c:otherwise>
[
<a
href=
"?op=view&date=${model.date}&domain=${model.domain}&product=${payload.product}&timeRange=${range.duration}"
>
${range.title}
</a>
]
</c:otherwise>
</c:choose>
</c:forEach>
</th>
</tr>
</table>
<div
class=
"row-fluid"
>
<div
class=
"span2"
>
<div
class=
"well sidebar-nav"
>
<ul
class=
"nav nav-list"
>
<li
class=
'nav-header'
id=
"${item.id}"
></li>
<c:forEach
var=
"item"
items=
"
${
model
.
productLines
}
"
varStatus=
"status"
>
<li
class=
'nav-header'
id=
"metric_${item.id}"
><a
href=
"?op=view&date=${model.date}&domain=${model.domain}&product=${item.id}&timeRange=${payload.timeRange}"
><strong>
${item.id}
</strong></a></li>
</c:forEach>
<li
>
</li>
</ul>
</div>
<!--/.well -->
</div>
<!--/span-->
<div
class=
"span10"
>
<c:forEach
var=
"item"
items=
"
${
model
.
lineCharts
}
"
varStatus=
"status"
>
<div
style=
"float:left;"
>
<div
id=
"${item.id}"
class=
"metricGraph"
></div>
</div>
</c:forEach>
</div>
</div>
</jsp:body>
</a:report>
</c:otherwise>
</c:choose>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
var
product
=
'
${payload.product}
'
;
$
(
'
#metric_
'
+
product
).
addClass
(
'
active
'
);
$
(
'
i[tips]
'
).
popover
();
<c:forEach
var=
"item"
items=
"
${
model
.
lineCharts
}
"
varStatus=
"status"
>
var
data
=
$
{
item
.
jsonString
};
graphMetricChart
(
document
.
getElementById
(
'
${item.id}
'
),
data
);
</c:forEach>
var
hide
=
$
{
payload
.
hideNav
};
if
(
hide
){
$
(
'
.opNav
'
).
slideUp
();
$
(
'
#switch
'
).
html
(
"
显示
"
);
}
});
function
showOpNav
()
{
var
b
=
$
(
'
#switch
'
).
html
();
if
(
b
==
'
隐藏
'
)
{
$
(
'
.opNav
'
).
slideUp
();
$
(
'
#switch
'
).
html
(
"
显示
"
);
}
else
{
$
(
'
.opNav
'
).
slideDown
();
$
(
'
#switch
'
).
html
(
"
隐藏
"
);
}
}
</script>
<style
type=
"text/css"
>
.well
{
padding
:
10px
10px
10px
19
p
;
}
.nav-list
li
a
{
padding
:
2px
15px
;
}
.nav
li
+
.nav-header
{
margin-top
:
2px
;
}
.nav-header
{
padding
:
5px
3px
;
}
</style>
cat-home/src/main/webapp/jsp/report/system/systemOpNav.jsp
已删除
100644 → 0
浏览文件 @
6b85a669
<%@ page
contentType=
"text/html; charset=utf-8"
%>
<div
class=
"row-fluid"
style=
"margin-top:2px;"
>
<div
class=
"span8 text-center"
>
<a
id=
"navlineChart"
class=
"btn btn-small btn-primary"
href=
"/cat/r/dependency?domain=${model.domain}&date=${model.date}"
>
实时趋势图
</a>
<a
id=
"navdependencyGraph"
class=
"btn btn-small btn-primary"
href=
"/cat/r/dependency?op=dependencyGraph&domain=${model.domain}&date=${model.date}"
>
实时拓扑图
</a>
<a
id=
"navmetricDashboard"
class=
"btn btn-small btn-primary"
href=
"/cat/r/dependency?op=metricDashboard&domain=${model.domain}&date=${model.date}"
>
系统报错大盘
</a>
<a
id=
"navdashboard"
class=
"btn btn-small btn-primary"
href=
"/cat/r/dependency?op=dashboard&domain=${model.domain}&date=${model.date}"
>
应用监控盘
</a>
<a
id=
"navbussiness"
class=
"btn btn-small btn-primary"
href=
"/cat/r/metric?op=dashboard&domain=${model.domain}&date=${model.date}"
>
业务监控大盘
</a>
<a
id=
"navnetwork"
class=
"btn btn-small btn-primary"
href=
"/cat/r/network?op=view&domain=${model.domain}&date=${model.date}"
>
网络监控大盘
</a>
<a
id=
"navsystem"
class=
"btn btn-small btn-primary btn-danger"
href=
"/cat/r/system?op=view&domain=${model.domain}&date=${model.date}"
>
系统监控大盘
</a>
</div>
<div
class=
"span4 text-center"
>
<div
class=
'text-center'
>
<a
id=
"refresh10"
class=
'btn btn-small btn-primary'
href=
"?op=${payload.action.name}&product=${payload.product}&group=${payload.group}&fullScreen=${payload.fullScreen}&hideNav=${payload.hideNav}&refresh=true&frequency=10&domain=${model.domain}&timeRange=${payload.timeRange}"
>
10秒
</a>
<a
id=
"refresh20"
class=
'btn btn-small btn-primary'
href=
"?op=${payload.action.name}&product=${payload.product}&group=${payload.group}&fullScreen=${payload.fullScreen}&hideNav=${payload.hideNav}&refresh=true&frequency=20&domain=${model.domain}&timeRange=${payload.timeRange}"
>
20秒
</a>
<a
id=
"refresh30"
class=
'btn btn-small btn-primary'
href=
"?op=${payload.action.name}&product=${payload.product}&group=${payload.group}&fullScreen=${payload.fullScreen}&hideNav=${payload.hideNav}&refresh=true&frequency=30&domain=${model.domain}&timeRange=${payload.timeRange}"
>
30秒
</a>
<a
id=
"fullScreen"
class=
'btn btn-small btn-primary'
href=
"?op=${payload.action.name}&product=${payload.product}&group=${payload.group}&fullScreen=${!payload.fullScreen}&hideNav=${payload.hideNav}&refresh=${payload.refresh}&frequency=${payload.frequency}&domain=${model.domain}&timeRange=${payload.timeRange}"
>
全屏
</a>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
var
refresh
=
$
{
payload
.
refresh
};
var
frequency
=
$
{
payload
.
frequency
};
var
fullscreen
=
$
{
payload
.
fullScreen
};
if
(
fullscreen
){
$
(
'
#fullScreen
'
).
addClass
(
'
btn-danger
'
);
}
if
(
refresh
){
$
(
'
#refresh${payload.frequency}
'
).
addClass
(
'
btn-danger
'
);
setInterval
(
function
(){
location
.
reload
();
},
frequency
*
1000
);
};
});
</script>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录