Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
d85fed09
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,发现更多精彩内容 >>
提交
d85fed09
编写于
3月 26, 2014
作者:
Y
youyong205
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #266 from leonindy/master
li.yang add alteration insert/view pages
上级
3ac030ed
0641c159
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
1438 addition
and
41 deletion
+1438
-41
cat-client/src/main/resources/com/dianping/cat/configuration/client/config.xsd
...esources/com/dianping/cat/configuration/client/config.xsd
+1
-2
cat-client/src/main/resources/com/dianping/cat/status/model/status.xsd
...c/main/resources/com/dianping/cat/status/model/status.xsd
+1
-2
cat-home/src/main/java/com/dianping/cat/build/CatDatabaseConfigurator.java
.../java/com/dianping/cat/build/CatDatabaseConfigurator.java
+9
-9
cat-home/src/main/java/com/dianping/cat/build/UserDatabaseConfigurator.java
...java/com/dianping/cat/build/UserDatabaseConfigurator.java
+7
-7
cat-home/src/main/java/com/dianping/cat/report/ReportModule.java
...e/src/main/java/com/dianping/cat/report/ReportModule.java
+2
-0
cat-home/src/main/java/com/dianping/cat/report/ReportPage.java
...ome/src/main/java/com/dianping/cat/report/ReportPage.java
+3
-1
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Action.java
.../java/com/dianping/cat/report/page/alteration/Action.java
+28
-0
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Context.java
...java/com/dianping/cat/report/page/alteration/Context.java
+7
-0
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Handler.java
...java/com/dianping/cat/report/page/alteration/Handler.java
+262
-0
cat-home/src/main/java/com/dianping/cat/report/page/alteration/JspFile.java
...java/com/dianping/cat/report/page/alteration/JspFile.java
+18
-0
cat-home/src/main/java/com/dianping/cat/report/page/alteration/JspViewer.java
...va/com/dianping/cat/report/page/alteration/JspViewer.java
+20
-0
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Model.java
...n/java/com/dianping/cat/report/page/alteration/Model.java
+52
-0
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Payload.java
...java/com/dianping/cat/report/page/alteration/Payload.java
+273
-0
cat-home/src/main/java/com/dianping/cat/report/view/NavigationBar.java
...main/java/com/dianping/cat/report/view/NavigationBar.java
+2
-0
cat-home/src/main/resources/META-INF/dal/jdbc/report-codegen.xml
...e/src/main/resources/META-INF/dal/jdbc/report-codegen.xml
+49
-0
cat-home/src/main/resources/META-INF/dal/jdbc/report-dal.xml
cat-home/src/main/resources/META-INF/dal/jdbc/report-dal.xml
+49
-16
cat-home/src/main/resources/META-INF/dal/jdbc/user-codegen.xml
...ome/src/main/resources/META-INF/dal/jdbc/user-codegen.xml
+6
-3
cat-home/src/main/resources/META-INF/plexus/components.xml
cat-home/src/main/resources/META-INF/plexus/components.xml
+49
-0
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.out.xml
...me/src/main/resources/META-INF/wizard/jdbc/wizard.out.xml
+0
-0
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.xml
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.xml
+2
-1
cat-home/src/main/resources/META-INF/wizard/webapp/wizard.xml
...home/src/main/resources/META-INF/wizard/webapp/wizard.xml
+3
-0
cat-home/src/main/webapp/jsp/report/alteration/alter_insertResult.jsp
.../main/webapp/jsp/report/alteration/alter_insertResult.jsp
+3
-0
cat-home/src/main/webapp/jsp/report/alteration/alter_query.jsp
...ome/src/main/webapp/jsp/report/alteration/alter_query.jsp
+52
-0
cat-home/src/main/webapp/jsp/report/alteration/alter_view.jsp
...home/src/main/webapp/jsp/report/alteration/alter_view.jsp
+197
-0
cat-home/src/main/webapp/jsp/report/alteration/alter_view_backup.jsp
...c/main/webapp/jsp/report/alteration/alter_view_backup.jsp
+343
-0
未找到文件。
cat-client/src/main/resources/com/dianping/cat/configuration/client/config.xsd
浏览文件 @
d85fed09
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
elementFormDefault=
"qualified"
attributeFormDefault=
"unqualified"
>
<xs:schema
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
elementFormDefault=
"qualified"
attributeFormDefault=
"unqualified"
>
<xs:element
name=
"config"
type=
"ConfigType"
/>
<xs:element
name=
"config"
type=
"ConfigType"
/>
<xs:complexType
name=
"ConfigType"
>
<xs:complexType
name=
"ConfigType"
>
<xs:sequence>
<xs:sequence>
...
...
cat-client/src/main/resources/com/dianping/cat/status/model/status.xsd
浏览文件 @
d85fed09
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
elementFormDefault=
"qualified"
attributeFormDefault=
"unqualified"
>
<xs:schema
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
elementFormDefault=
"qualified"
attributeFormDefault=
"unqualified"
>
<xs:element
name=
"status"
type=
"StatusType"
/>
<xs:element
name=
"status"
type=
"StatusType"
/>
<xs:complexType
name=
"StatusType"
>
<xs:complexType
name=
"StatusType"
>
<xs:sequence>
<xs:sequence>
...
...
cat-home/src/main/java/com/dianping/cat/build/CatDatabaseConfigurator.java
浏览文件 @
d85fed09
...
@@ -7,16 +7,16 @@ import org.unidal.dal.jdbc.configuration.AbstractJdbcResourceConfigurator;
...
@@ -7,16 +7,16 @@ import org.unidal.dal.jdbc.configuration.AbstractJdbcResourceConfigurator;
import
org.unidal.lookup.configuration.Component
;
import
org.unidal.lookup.configuration.Component
;
final
class
CatDatabaseConfigurator
extends
AbstractJdbcResourceConfigurator
{
final
class
CatDatabaseConfigurator
extends
AbstractJdbcResourceConfigurator
{
@Override
@Override
public
List
<
Component
>
defineComponents
()
{
public
List
<
Component
>
defineComponents
()
{
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
defineSimpleTableProviderComponents
(
all
,
"cat"
,
com
.
dianping
.
cat
.
home
.
dal
.
report
.
_INDEX
.
getEntityClasses
());
defineSimpleTableProviderComponents
(
all
,
"cat"
,
com
.
dianping
.
cat
.
home
.
dal
.
report
.
_INDEX
.
getEntityClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
home
.
dal
.
report
.
_INDEX
.
getDaoClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
home
.
dal
.
report
.
_INDEX
.
getDaoClasses
());
defineSimpleTableProviderComponents
(
all
,
"cat"
,
com
.
dianping
.
cat
.
home
.
dal
.
alarm
.
_INDEX
.
getEntityClasses
());
defineSimpleTableProviderComponents
(
all
,
"cat"
,
com
.
dianping
.
cat
.
home
.
dal
.
alarm
.
_INDEX
.
getEntityClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
home
.
dal
.
alarm
.
_INDEX
.
getDaoClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
home
.
dal
.
alarm
.
_INDEX
.
getDaoClasses
());
return
all
;
return
all
;
}
}
}
}
cat-home/src/main/java/com/dianping/cat/build/UserDatabaseConfigurator.java
浏览文件 @
d85fed09
...
@@ -7,13 +7,13 @@ import org.unidal.dal.jdbc.configuration.AbstractJdbcResourceConfigurator;
...
@@ -7,13 +7,13 @@ import org.unidal.dal.jdbc.configuration.AbstractJdbcResourceConfigurator;
import
org.unidal.lookup.configuration.Component
;
import
org.unidal.lookup.configuration.Component
;
final
class
UserDatabaseConfigurator
extends
AbstractJdbcResourceConfigurator
{
final
class
UserDatabaseConfigurator
extends
AbstractJdbcResourceConfigurator
{
@Override
@Override
public
List
<
Component
>
defineComponents
()
{
public
List
<
Component
>
defineComponents
()
{
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
defineSimpleTableProviderComponents
(
all
,
"user"
,
com
.
dianping
.
cat
.
home
.
dal
.
user
.
_INDEX
.
getEntityClasses
());
defineSimpleTableProviderComponents
(
all
,
"user"
,
com
.
dianping
.
cat
.
home
.
dal
.
user
.
_INDEX
.
getEntityClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
home
.
dal
.
user
.
_INDEX
.
getDaoClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
home
.
dal
.
user
.
_INDEX
.
getDaoClasses
());
return
all
;
return
all
;
}
}
}
}
cat-home/src/main/java/com/dianping/cat/report/ReportModule.java
浏览文件 @
d85fed09
...
@@ -43,6 +43,8 @@ com.dianping.cat.report.page.externalError.Handler.class,
...
@@ -43,6 +43,8 @@ com.dianping.cat.report.page.externalError.Handler.class,
com
.
dianping
.
cat
.
report
.
page
.
statistics
.
Handler
.
class
,
com
.
dianping
.
cat
.
report
.
page
.
statistics
.
Handler
.
class
,
com
.
dianping
.
cat
.
report
.
page
.
alteration
.
Handler
.
class
,
com
.
dianping
.
cat
.
report
.
page
.
monitor
.
Handler
.
class
com
.
dianping
.
cat
.
report
.
page
.
monitor
.
Handler
.
class
})
})
public
class
ReportModule
extends
AbstractModule
{
public
class
ReportModule
extends
AbstractModule
{
...
...
cat-home/src/main/java/com/dianping/cat/report/ReportPage.java
浏览文件 @
d85fed09
...
@@ -41,8 +41,10 @@ public enum ReportPage implements Page {
...
@@ -41,8 +41,10 @@ public enum ReportPage implements Page {
STATISTICS
(
"statistics"
,
"statistics"
,
"Statistics"
,
"Statistics"
,
true
),
STATISTICS
(
"statistics"
,
"statistics"
,
"Statistics"
,
"Statistics"
,
true
),
MONITOR
(
"monitor"
,
"monitor"
,
"Monitor"
,
"Monitor"
,
true
)
;
MONITOR
(
"monitor"
,
"monitor"
,
"Monitor"
,
"Monitor"
,
true
)
,
ALTERATION
(
"alteration"
,
"alteration"
,
"Alteration"
,
"Alteration"
,
true
);
private
String
m_name
;
private
String
m_name
;
private
String
m_path
;
private
String
m_path
;
...
...
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Action.java
0 → 100644
浏览文件 @
d85fed09
package
com.dianping.cat.report.page.alteration
;
public
enum
Action
implements
org
.
unidal
.
web
.
mvc
.
Action
{
INSERT
(
"insert"
),
VIEW
(
"view"
);
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
))
{
return
action
;
}
}
return
defaultAction
;
}
@Override
public
String
getName
()
{
return
m_name
;
}
}
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Context.java
0 → 100644
浏览文件 @
d85fed09
package
com.dianping.cat.report.page.alteration
;
import
com.dianping.cat.report.ReportContext
;
public
class
Context
extends
ReportContext
<
Payload
>
{
}
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Handler.java
0 → 100644
浏览文件 @
d85fed09
package
com.dianping.cat.report.page.alteration
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.ServletException
;
import
org.unidal.lookup.annotation.Inject
;
import
org.unidal.web.mvc.PageHandler
;
import
org.unidal.web.mvc.annotation.InboundActionMeta
;
import
org.unidal.web.mvc.annotation.OutboundActionMeta
;
import
org.unidal.web.mvc.annotation.PayloadMeta
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.home.dal.report.Alteration
;
import
com.dianping.cat.home.dal.report.AlterationDao
;
import
com.dianping.cat.home.dal.report.AlterationEntity
;
import
com.dianping.cat.report.ReportPage
;
import
com.site.lookup.util.StringUtils
;
public
class
Handler
implements
PageHandler
<
Context
>
{
@Inject
private
JspViewer
m_jspViewer
;
@Inject
private
AlterationDao
m_alterationDao
;
private
long
buildBarrelKey
(
long
barTime
,
long
endMill
,
long
granularity
)
{
long
key
;
if
(
endMill
==
barTime
)
{
key
=
barTime
-
granularity
;
}
else
if
((
endMill
-
barTime
)
/
granularity
==
0
)
{
key
=
barTime
;
}
else
{
key
=
endMill
-
((
endMill
-
barTime
)
/
granularity
+
1
)
*
granularity
;
}
return
key
;
}
private
String
buildType
(
String
type
)
{
String
str
;
if
(
type
!=
null
)
{
str
=
type
.
toLowerCase
();
}
else
{
return
"other"
;
}
if
(!
"puppet"
.
equals
(
str
)
&&
!
"workflow"
.
equals
(
str
)
&&
!
"lazyman"
.
equals
(
str
))
{
return
"other"
;
}
else
{
return
type
;
}
}
@Override
@PayloadMeta
(
Payload
.
class
)
@InboundActionMeta
(
name
=
"alteration"
)
public
void
handleInbound
(
Context
ctx
)
throws
ServletException
,
IOException
{
// display only, no action here
}
@Override
@OutboundActionMeta
(
name
=
"alteration"
)
public
void
handleOutbound
(
Context
ctx
)
throws
ServletException
,
IOException
{
Model
model
=
new
Model
(
ctx
);
Payload
payload
=
ctx
.
getPayload
();
Action
action
=
payload
.
getAction
();
switch
(
action
)
{
case
INSERT:
if
(!
isArguComplete
(
payload
))
{
setInsertResult
(
model
,
2
);
}
else
{
Alteration
alt
=
buildAlteration
(
payload
);
try
{
int
count
=
m_alterationDao
.
insert
(
alt
);
if
(
count
==
0
)
{
setInsertResult
(
model
,
1
);
break
;
}
else
{
setInsertResult
(
model
,
0
);
}
}
catch
(
Exception
e
)
{
Cat
.
logError
(
e
);
setInsertResult
(
model
,
1
);
}
}
break
;
case
VIEW:
long
granularity
=
payload
.
getGranularity
();
List
<
Alteration
>
alts
;
Date
startTime
=
payload
.
getStartTime
();
Date
endTime
=
payload
.
getEndTime
();
try
{
alts
=
m_alterationDao
.
findByDtdh
(
startTime
,
endTime
,
payload
.
getType
(),
payload
.
getDomain
(),
payload
.
getHostname
(),
AlterationEntity
.
READSET_FULL
);
}
catch
(
Exception
e
)
{
Cat
.
logError
(
e
);
break
;
}
Map
<
Long
,
AltBarrel
>
alterations
=
buildBarrelViewModel
(
alts
,
granularity
,
endTime
.
getTime
());
model
.
setBarrels
(
alterations
);
break
;
}
model
.
setAction
(
action
);
model
.
setPage
(
ReportPage
.
ALTERATION
);
if
(!
ctx
.
isProcessStopped
())
{
m_jspViewer
.
view
(
ctx
,
model
);
}
}
private
Map
<
Long
,
AltBarrel
>
buildBarrelViewModel
(
List
<
Alteration
>
alts
,
long
granularity
,
long
endMill
)
{
Map
<
Long
,
AltBarrel
>
alterations
=
new
LinkedHashMap
<
Long
,
AltBarrel
>();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
for
(
Alteration
altGenBarrel
:
alts
)
{
long
barTime
=
altGenBarrel
.
getDate
().
getTime
();
long
key
=
buildBarrelKey
(
barTime
,
endMill
,
granularity
);
AltBarrel
tmpBarrel
=
alterations
.
get
(
key
);
List
<
Alteration
>
tmpAlterations
;
if
(
tmpBarrel
==
null
)
{
alterations
.
put
(
key
,
new
AltBarrel
(
sdf
.
format
(
new
Date
(
key
)),
sdf
.
format
(
new
Date
(
key
+
granularity
)),
key
));
tmpBarrel
=
alterations
.
get
(
key
);
}
tmpAlterations
=
tmpBarrel
.
getAlterationMap
().
get
(
buildType
(
altGenBarrel
.
getType
()));
tmpAlterations
.
add
(
altGenBarrel
);
}
return
alterations
;
}
private
Alteration
buildAlteration
(
Payload
payload
)
{
String
type
=
payload
.
getType
();
String
domain
=
payload
.
getDomain
();
String
hostname
=
payload
.
getHostname
();
String
title
=
payload
.
getTitle
();
String
ip
=
payload
.
getIp
();
String
user
=
payload
.
getUser
();
String
group
=
payload
.
getGroup
();
String
content
=
payload
.
getContent
();
String
url
=
payload
.
getUrl
();
Date
date
=
payload
.
getAlterationDate
();
Alteration
alt
=
new
Alteration
();
alt
.
setType
(
type
);
alt
.
setDomain
(
domain
);
alt
.
setTitle
(
title
);
alt
.
setIp
(
ip
);
alt
.
setUser
(
user
);
alt
.
setAltGroup
(
group
);
alt
.
setContent
(
content
);
alt
.
setUrl
(
url
);
alt
.
setHostname
(
hostname
);
alt
.
setDate
(
date
);
return
alt
;
}
public
boolean
isArguComplete
(
Payload
payload
)
{
if
(
StringUtils
.
isEmpty
(
payload
.
getType
()))
{
return
false
;
}
if
(
StringUtils
.
isEmpty
(
payload
.
getTitle
()))
{
return
false
;
}
if
(
StringUtils
.
isEmpty
(
payload
.
getDomain
()))
{
return
false
;
}
if
(
StringUtils
.
isEmpty
(
payload
.
getHostname
()))
{
return
false
;
}
if
(
payload
.
getAlterationDate
()
==
null
)
{
return
false
;
}
if
(
StringUtils
.
isEmpty
(
payload
.
getUser
()))
{
return
false
;
}
if
(
StringUtils
.
isEmpty
(
payload
.
getContent
()))
{
return
false
;
}
return
true
;
}
/**
* status code: 0-success 1-fail 2-fail(lack args)
*
* @param model
* @param status
*/
public
void
setInsertResult
(
Model
model
,
int
status
)
{
if
(
status
==
0
)
{
model
.
setInsertResult
(
"{\"status\":200}"
);
}
else
if
(
status
==
1
)
{
model
.
setInsertResult
(
"{\"status\":500}"
);
}
else
if
(
status
==
2
)
{
model
.
setInsertResult
(
"{\"status\":200, \"errorMessage\":\"lack args\"}"
);
}
}
public
class
AltBarrel
{
private
Map
<
String
,
List
<
Alteration
>>
m_alterationMap
;
private
String
m_startTime
;
private
String
m_endTime
;
private
long
m_key
;
public
AltBarrel
(
String
startTime
,
String
endTime
,
long
key
)
{
m_startTime
=
startTime
;
m_endTime
=
endTime
;
m_key
=
key
;
m_alterationMap
=
new
HashMap
<
String
,
List
<
Alteration
>>();
m_alterationMap
.
put
(
"puppet"
,
new
ArrayList
<
Alteration
>());
m_alterationMap
.
put
(
"workflow"
,
new
ArrayList
<
Alteration
>());
m_alterationMap
.
put
(
"lazyman"
,
new
ArrayList
<
Alteration
>());
m_alterationMap
.
put
(
"other"
,
new
ArrayList
<
Alteration
>());
}
public
Map
<
String
,
List
<
Alteration
>>
getAlterationMap
()
{
return
m_alterationMap
;
}
public
String
getEndTime
()
{
return
m_endTime
;
}
public
long
getKey
()
{
return
m_key
;
}
public
String
getStartTime
()
{
return
m_startTime
;
}
public
void
setAlterationMap
(
Map
<
String
,
List
<
Alteration
>>
tmpAltMap
)
{
m_alterationMap
=
tmpAltMap
;
}
public
void
setEndTime
(
String
endTime
)
{
m_endTime
=
endTime
;
}
public
void
setStartTime
(
String
startTime
)
{
m_startTime
=
startTime
;
}
}
}
cat-home/src/main/java/com/dianping/cat/report/page/alteration/JspFile.java
0 → 100644
浏览文件 @
d85fed09
package
com.dianping.cat.report.page.alteration
;
public
enum
JspFile
{
INSERT
(
"/jsp/report/alteration/alter_insertResult.jsp"
),
VIEW
(
"/jsp/report/alteration/alter_view.jsp"
),
;
private
String
m_path
;
private
JspFile
(
String
path
)
{
m_path
=
path
;
}
public
String
getPath
()
{
return
m_path
;
}
}
cat-home/src/main/java/com/dianping/cat/report/page/alteration/JspViewer.java
0 → 100644
浏览文件 @
d85fed09
package
com.dianping.cat.report.page.alteration
;
import
com.dianping.cat.report.ReportPage
;
import
org.unidal.web.mvc.view.BaseJspViewer
;
public
class
JspViewer
extends
BaseJspViewer
<
ReportPage
,
Action
,
Context
,
Model
>
{
@Override
protected
String
getJspFilePath
(
Context
ctx
,
Model
model
)
{
Action
action
=
model
.
getAction
();
switch
(
action
)
{
case
INSERT:
return
JspFile
.
INSERT
.
getPath
();
case
VIEW:
return
JspFile
.
VIEW
.
getPath
();
}
throw
new
RuntimeException
(
"Unknown action: "
+
action
);
}
}
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Model.java
0 → 100644
浏览文件 @
d85fed09
package
com.dianping.cat.report.page.alteration
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Map
;
import
com.dianping.cat.Constants
;
import
com.dianping.cat.report.page.AbstractReportModel
;
import
com.dianping.cat.report.page.alteration.Handler.AltBarrel
;
public
class
Model
extends
AbstractReportModel
<
Action
,
Context
>
{
private
String
m_insertResult
;
private
Map
<
Long
,
AltBarrel
>
m_barrels
;
public
Model
(
Context
ctx
)
{
super
(
ctx
);
}
public
Map
<
Long
,
AltBarrel
>
getBarrels
()
{
return
m_barrels
;
}
@Override
public
Action
getDefaultAction
()
{
return
Action
.
VIEW
;
}
@Override
public
String
getDomain
()
{
return
Constants
.
CAT
;
}
@Override
public
Collection
<
String
>
getDomains
()
{
return
new
ArrayList
<
String
>();
}
public
String
getInsertResult
()
{
return
m_insertResult
;
}
public
void
setBarrels
(
Map
<
Long
,
AltBarrel
>
barrels
)
{
m_barrels
=
barrels
;
}
public
void
setInsertResult
(
String
insertResult
)
{
m_insertResult
=
insertResult
;
}
}
cat-home/src/main/java/com/dianping/cat/report/page/alteration/Payload.java
0 → 100644
浏览文件 @
d85fed09
package
com.dianping.cat.report.page.alteration
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
org.unidal.web.mvc.ActionContext
;
import
org.unidal.web.mvc.payload.annotation.FieldMeta
;
import
com.dianping.cat.helper.TimeUtil
;
import
com.dianping.cat.report.ReportPage
;
import
com.dianping.cat.report.page.AbstractReportPayload
;
public
class
Payload
extends
AbstractReportPayload
<
Action
>
{
private
ReportPage
m_page
;
@FieldMeta
(
"frequency"
)
private
int
m_frequency
=
10
;
@FieldMeta
(
"rows"
)
private
int
m_rows
=
10
;
@FieldMeta
(
"refresh"
)
private
boolean
m_refresh
=
false
;
@FieldMeta
(
"fullScreen"
)
private
boolean
fullScreen
=
false
;
@FieldMeta
(
"group"
)
private
String
m_group
;
@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
(
"alterationDate"
)
private
String
m_alterationDate
;
@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
;
@FieldMeta
(
"hostname"
)
private
String
m_hostname
;
private
SimpleDateFormat
m_sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
public
Payload
()
{
super
(
ReportPage
.
ALTERATION
);
}
@Override
public
Action
getAction
()
{
if
(
m_action
==
null
)
{
return
Action
.
VIEW
;
}
else
{
return
m_action
;
}
}
public
Date
getAlterationDate
()
{
try
{
return
m_sdf
.
parse
(
m_alterationDate
);
}
catch
(
ParseException
e
)
{
return
new
Date
();
}
}
public
String
getContent
()
{
return
m_content
;
}
public
String
getDomain
()
{
if
(
""
.
equals
(
m_domain
))
{
return
null
;
}
else
{
return
m_domain
;
}
}
public
Date
getEndTime
()
{
if
(
m_endTime
==
null
||
m_endTime
.
length
()
==
0
)
{
return
new
Date
();
}
else
{
try
{
return
m_sdf
.
parse
(
m_endTime
);
}
catch
(
ParseException
e
)
{
return
new
Date
();
}
}
}
public
int
getFrequency
()
{
return
m_frequency
;
}
public
long
getGranularity
()
{
return
m_granularity
;
}
public
String
getGroup
()
{
return
m_group
;
}
public
String
getHostname
()
{
if
(
""
.
equals
(
m_hostname
)){
return
null
;
}
else
{
return
m_hostname
;
}
}
public
String
getIp
()
{
return
m_ip
;
}
public
ReportPage
getPage
()
{
return
m_page
;
}
public
int
getRows
()
{
return
m_rows
;
}
public
Date
getStartTime
()
{
if
(
m_startTime
==
null
||
m_startTime
.
length
()
==
0
)
{
return
new
Date
(
System
.
currentTimeMillis
()
-
TimeUtil
.
ONE_HOUR
);
}
else
{
try
{
return
m_sdf
.
parse
(
m_startTime
);
}
catch
(
ParseException
e
)
{
return
new
Date
();
}
}
}
public
String
getTitle
()
{
return
m_title
;
}
public
String
getType
()
{
return
m_type
;
}
public
String
getUrl
()
{
return
m_url
;
}
public
String
getUser
()
{
return
m_user
;
}
public
boolean
isFullScreen
()
{
return
fullScreen
;
}
public
boolean
isRefresh
()
{
return
m_refresh
;
}
public
void
setAction
(
String
action
)
{
m_action
=
Action
.
getByName
(
action
,
Action
.
VIEW
);
}
public
void
setAlterationDate
(
String
alterationDate
)
{
m_alterationDate
=
alterationDate
;
}
public
void
setContent
(
String
content
)
{
m_content
=
content
;
}
public
void
setDomain
(
String
domain
)
{
m_domain
=
domain
;
}
public
void
setEndTime
(
String
endTime
)
{
m_endTime
=
endTime
;
}
public
void
setFrequency
(
int
frequency
)
{
m_frequency
=
frequency
;
}
public
void
setFullScreen
(
boolean
fullScreen
)
{
this
.
fullScreen
=
fullScreen
;
}
public
void
setGranularity
(
long
granularity
)
{
m_granularity
=
granularity
;
}
public
void
setGroup
(
String
group
)
{
m_group
=
group
;
}
public
void
setHostname
(
String
hostname
)
{
m_hostname
=
hostname
;
}
public
void
setIp
(
String
ip
)
{
m_ip
=
ip
;
}
public
void
setPage
(
ReportPage
page
)
{
m_page
=
page
;
}
@Override
public
void
setPage
(
String
page
)
{
m_page
=
ReportPage
.
getByName
(
page
,
ReportPage
.
ALTERATION
);
}
public
void
setRefresh
(
boolean
refresh
)
{
m_refresh
=
refresh
;
}
public
void
setRows
(
int
rows
)
{
m_rows
=
rows
;
}
public
void
setStartTime
(
String
startTime
)
{
m_startTime
=
startTime
;
}
public
void
setTitle
(
String
title
)
{
m_title
=
title
;
}
public
void
setType
(
String
type
)
{
m_type
=
type
;
}
public
void
setUrl
(
String
url
)
{
m_url
=
url
;
}
public
void
setUser
(
String
user
)
{
m_user
=
user
;
}
@Override
public
void
validate
(
ActionContext
<?>
ctx
)
{
if
(
m_action
==
null
)
{
m_action
=
Action
.
VIEW
;
}
}
}
cat-home/src/main/java/com/dianping/cat/report/view/NavigationBar.java
浏览文件 @
d85fed09
...
@@ -46,6 +46,8 @@ public class NavigationBar {
...
@@ -46,6 +46,8 @@ public class NavigationBar {
ReportPage
.
STATISTICS
,
ReportPage
.
STATISTICS
,
ReportPage
.
LOGVIEW
,
ReportPage
.
LOGVIEW
,
ReportPage
.
ALTERATION
,
};
};
}
}
...
...
cat-home/src/main/resources/META-INF/dal/jdbc/report-codegen.xml
浏览文件 @
d85fed09
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<entities>
<entities>
<entity
name=
"alteration"
table=
"alteration"
alias=
"a"
>
<member
name=
"id"
field=
"id"
value-type=
"int"
length=
"10"
nullable=
"false"
key=
"true"
auto-increment=
"true"
/>
<member
name=
"type"
field=
"type"
value-type=
"String"
length=
"64"
nullable=
"false"
/>
<member
name=
"title"
field=
"title"
value-type=
"String"
length=
"128"
nullable=
"false"
/>
<member
name=
"domain"
field=
"domain"
value-type=
"String"
length=
"128"
nullable=
"false"
/>
<member
name=
"hostname"
field=
"hostname"
value-type=
"String"
length=
"128"
nullable=
"false"
/>
<member
name=
"ip"
field=
"ip"
value-type=
"String"
length=
"128"
/>
<member
name=
"date"
field=
"date"
value-type=
"Date"
nullable=
"false"
/>
<member
name=
"user"
field=
"user"
value-type=
"String"
length=
"45"
nullable=
"false"
/>
<member
name=
"alt-group"
field=
"alt_group"
value-type=
"String"
length=
"45"
/>
<member
name=
"content"
field=
"content"
value-type=
"String"
length=
"65535"
nullable=
"false"
/>
<member
name=
"url"
field=
"url"
value-type=
"String"
length=
"200"
/>
<member
name=
"creation-date"
field=
"creation_date"
value-type=
"Date"
nullable=
"false"
/>
<var
name=
"key-id"
value-type=
"int"
key-member=
"id"
/>
<primary-key
name=
"PRIMARY"
members=
"id"
/>
<index
name=
"ind_date_domain_host"
members=
"date ASC, domain ASC, hostname ASC"
/>
<readsets>
<readset
name=
"FULL"
all=
"true"
/>
</readsets>
<updatesets>
<updateset
name=
"FULL"
all=
"true"
/>
</updatesets>
<query-defs>
<query
name=
"find-by-PK"
type=
"SELECT"
>
<param
name=
"key-id"
/>
<statement>
<![CDATA[SELECT <FIELDS/>
FROM
<TABLE/>
WHERE
<FIELD
name=
'id'
/>
= ${key-id}]]>
</statement>
</query>
<query
name=
"insert"
type=
"INSERT"
>
<statement>
<![CDATA[INSERT INTO <TABLE/>
(
<FIELDS/>
)
VALUES(
<VALUES/>
)]]>
</statement>
</query>
<query
name=
"update-by-PK"
type=
"UPDATE"
>
<param
name=
"key-id"
/>
<statement>
<![CDATA[UPDATE <TABLE/>
SET
<FIELDS/>
WHERE
<FIELD
name=
'id'
/>
= ${key-id}]]>
</statement>
</query>
<query
name=
"delete-by-PK"
type=
"DELETE"
>
<param
name=
"key-id"
/>
<statement>
<![CDATA[DELETE FROM <TABLE/>
WHERE
<FIELD
name=
'id'
/>
= ${key-id}]]>
</statement>
</query>
</query-defs>
</entity>
<entity
name=
"baseline"
table=
"baseline"
alias=
"b"
>
<entity
name=
"baseline"
table=
"baseline"
alias=
"b"
>
<member
name=
"id"
field=
"id"
value-type=
"int"
length=
"10"
nullable=
"false"
key=
"true"
auto-increment=
"true"
/>
<member
name=
"id"
field=
"id"
value-type=
"int"
length=
"10"
nullable=
"false"
key=
"true"
auto-increment=
"true"
/>
<member
name=
"report-name"
field=
"report_name"
value-type=
"String"
length=
"100"
/>
<member
name=
"report-name"
field=
"report_name"
value-type=
"String"
length=
"100"
/>
...
@@ -9,6 +55,8 @@
...
@@ -9,6 +55,8 @@
<member
name=
"creation-date"
field=
"creation_date"
value-type=
"Date"
/>
<member
name=
"creation-date"
field=
"creation_date"
value-type=
"Date"
/>
<var
name=
"key-id"
value-type=
"int"
key-member=
"id"
/>
<var
name=
"key-id"
value-type=
"int"
key-member=
"id"
/>
<primary-key
name=
"PRIMARY"
members=
"id"
/>
<primary-key
name=
"PRIMARY"
members=
"id"
/>
<index
name=
"ix_indexkey_reportperiod"
members=
"index_key ASC, report_period ASC"
/>
<index
name=
"ix_reportperiod"
members=
"report_period ASC"
/>
<readsets>
<readsets>
<readset
name=
"FULL"
all=
"true"
/>
<readset
name=
"FULL"
all=
"true"
/>
</readsets>
</readsets>
...
@@ -87,6 +135,7 @@
...
@@ -87,6 +135,7 @@
<member
name=
"creation-date"
field=
"creation_date"
value-type=
"Date"
nullable=
"false"
/>
<member
name=
"creation-date"
field=
"creation_date"
value-type=
"Date"
nullable=
"false"
/>
<var
name=
"key-id"
value-type=
"int"
key-member=
"id"
/>
<var
name=
"key-id"
value-type=
"int"
key-member=
"id"
/>
<primary-key
name=
"PRIMARY"
members=
"id"
/>
<primary-key
name=
"PRIMARY"
members=
"id"
/>
<index
name=
"ix_date_domain"
members=
"date ASC, domain ASC"
/>
<readsets>
<readsets>
<readset
name=
"FULL"
all=
"true"
/>
<readset
name=
"FULL"
all=
"true"
/>
</readsets>
</readsets>
...
...
cat-home/src/main/resources/META-INF/dal/jdbc/report-dal.xml
浏览文件 @
d85fed09
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<entities
do-package=
"com.dianping.cat.home.dal.report"
gen=
"true"
>
<entities
do-package=
"com.dianping.cat.home.dal.report"
gen=
"true"
>
<entity
name=
"alteration"
table=
"alteration"
alias=
"a"
>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
<var
name=
"start-time"
value-type=
"Date"
/>
<var
name=
"end-time"
value-type=
"Date"
/>
<param
name=
"type"
/>
<param
name=
"domain"
/>
<param
name=
"hostname"
/>
<query-defs>
<query
name=
"find-by-dtdh"
type=
"SELECT"
multiple=
"true"
>
<param
name=
"start-time"
/>
<param
name=
"end-time"
/>
<param
name=
"type"
/>
<param
name=
"domain"
/>
<param
name=
"hostname"
/>
<statement>
<![CDATA[
SELECT <FIELDS/>
FROM
<TABLE/>
WHERE
<FIELD
name=
'date'
/>
>= ${start-time}
AND
<FIELD
name=
'date'
/>
<
= ${end-time}
<IF
type=
'NOT_NULL'
field=
'type'
>
AND
<FIELD
name=
'type'
/>
= ${type}
</IF>
<IF
type=
'NOT_NULL'
field=
'domain'
>
AND
<FIELD
name=
'domain'
/>
= ${domain}
</IF>
<IF
type=
'NOT_NULL'
field=
'hostname'
>
AND
<FIELD
name=
'hostname'
/>
= ${hostname}
</IF>
ORDER BY
<FIELD
name=
'date'
/>
desc
]]>
</statement>
</query>
</query-defs>
</entity>
<entity
name=
"event"
table=
"event"
alias=
"e"
>
<entity
name=
"event"
table=
"event"
alias=
"e"
>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
<var
name=
"start-date"
value-type=
"Date"
/>
<var
name=
"start-date"
value-type=
"Date"
/>
<var
name=
"end-date"
value-type=
"Date"
/>
<var
name=
"end-date"
value-type=
"Date"
/>
<query-defs>
<query-defs>
<query
name=
"find-by-domain-time"
type=
"SELECT"
multiple=
"true"
>
<query
name=
"find-by-domain-time"
type=
"SELECT"
multiple=
"true"
>
<param
name=
"domain"
/>
<param
name=
"domain"
/>
<param
name=
"start-date"
/>
<param
name=
"start-date"
/>
...
@@ -18,22 +51,22 @@
...
@@ -18,22 +51,22 @@
]]>
</statement>
]]>
</statement>
</query>
</query>
</query-defs>
</query-defs>
</entity>
</entity>
<entity
name=
"topology-graph"
table=
"topologyGraph"
alias=
"t"
>
<entity
name=
"topology-graph"
table=
"topologyGraph"
alias=
"t"
>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
<query-defs>
<query-defs>
<query
name=
"find-by-period"
type=
"SELECT"
>
<query
name=
"find-by-period"
type=
"SELECT"
>
<param
name=
"period"
/>
<param
name=
"period"
/>
<statement>
<![CDATA[SELECT <FIELDS/>
<statement>
<![CDATA[SELECT <FIELDS/>
FROM
<TABLE/>
FROM
<TABLE/>
WHERE
<FIELD
name=
'period'
/>
= ${period}]]>
</statement>
WHERE
<FIELD
name=
'period'
/>
= ${period}]]>
</statement>
</query>
</query>
</query-defs>
</query-defs>
</entity>
</entity>
<entity
name=
"baseline"
table=
"baseline"
alias=
"b"
>
<entity
name=
"baseline"
table=
"baseline"
alias=
"b"
>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
<var
name=
"dataInDoubleArray"
value-type=
"double[]"
/>
<var
name=
"dataInDoubleArray"
value-type=
"double[]"
/>
<query-defs>
<query-defs>
<query
name=
"find-by-report-name-key-time"
type=
"SELECT"
>
<query
name=
"find-by-report-name-key-time"
type=
"SELECT"
>
<param
name=
"report-period"
/>
<param
name=
"report-period"
/>
<param
name=
"report-name"
/>
<param
name=
"report-name"
/>
...
...
cat-home/src/main/resources/META-INF/dal/jdbc/user-codegen.xml
浏览文件 @
d85fed09
...
@@ -17,13 +17,16 @@
...
@@ -17,13 +17,16 @@
</updatesets>
</updatesets>
<query-defs>
<query-defs>
<query
name=
"find-by-PK"
type=
"SELECT"
>
<query
name=
"find-by-PK"
type=
"SELECT"
>
<statement>
<![CDATA[SELECT <FIELDS/> FROM <TABLE/>]]>
</statement>
<statement>
<![CDATA[SELECT <FIELDS/>
FROM
<TABLE/>
]]>
</statement>
</query>
</query>
<query
name=
"insert"
type=
"INSERT"
>
<query
name=
"insert"
type=
"INSERT"
>
<statement>
<![CDATA[INSERT INTO <TABLE/>(<FIELDS/>) VALUES(<VALUES/>)]]>
</statement>
<statement>
<![CDATA[INSERT INTO <TABLE/>
(
<FIELDS/>
)
VALUES(
<VALUES/>
)]]>
</statement>
</query>
</query>
<query
name=
"update-by-PK"
type=
"UPDATE"
>
<query
name=
"update-by-PK"
type=
"UPDATE"
>
<statement>
<![CDATA[UPDATE <TABLE/> SET <FIELDS/>]]>
</statement>
<statement>
<![CDATA[UPDATE <TABLE/>
SET
<FIELDS/>
]]>
</statement>
</query>
</query>
<query
name=
"delete-by-PK"
type=
"DELETE"
>
<query
name=
"delete-by-PK"
type=
"DELETE"
>
<statement>
<![CDATA[DELETE FROM <TABLE/>]]>
</statement>
<statement>
<![CDATA[DELETE FROM <TABLE/>]]>
</statement>
...
...
cat-home/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
d85fed09
...
@@ -1475,6 +1475,16 @@
...
@@ -1475,6 +1475,16 @@
<datasourceFile>
/data/appdatas/cat/datasources.xml
</datasourceFile>
<datasourceFile>
/data/appdatas/cat/datasources.xml
</datasourceFile>
</configuration>
</configuration>
</component>
</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>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
baseline
</role-hint>
<role-hint>
baseline
</role-hint>
...
@@ -1545,6 +1555,15 @@
...
@@ -1545,6 +1555,15 @@
<data-source-name>
cat
</data-source-name>
<data-source-name>
cat
</data-source-name>
</configuration>
</configuration>
</component>
</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>
<component>
<role>
com.dianping.cat.home.dal.report.BaselineDao
</role>
<role>
com.dianping.cat.home.dal.report.BaselineDao
</role>
<implementation>
com.dianping.cat.home.dal.report.BaselineDao
</implementation>
<implementation>
com.dianping.cat.home.dal.report.BaselineDao
</implementation>
...
@@ -2805,6 +2824,36 @@
...
@@ -2805,6 +2824,36 @@
</requirement>
</requirement>
</requirements>
</requirements>
</component>
</component>
<component>
<role>
com.dianping.cat.report.page.alteration.Handler
</role>
<implementation>
com.dianping.cat.report.page.alteration.Handler
</implementation>
<requirements>
<requirement>
<role>
com.dianping.cat.report.page.alteration.JspViewer
</role>
</requirement>
<requirement>
<role>
com.dianping.cat.home.dal.report.AlterationDao
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.report.page.alteration.JspViewer
</role>
<implementation>
com.dianping.cat.report.page.alteration.JspViewer
</implementation>
<requirements>
<requirement>
<role>
org.unidal.web.mvc.view.model.ModelHandler
</role>
</requirement>
</requirements>
</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>
<component>
<role>
com.dianping.cat.report.page.monitor.Handler
</role>
<role>
com.dianping.cat.report.page.monitor.Handler
</role>
<implementation>
com.dianping.cat.report.page.monitor.Handler
</implementation>
<implementation>
com.dianping.cat.report.page.monitor.Handler
</implementation>
...
...
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.out.xml
0 → 100644
浏览文件 @
d85fed09
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.xml
浏览文件 @
d85fed09
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<driver>
com.mysql.jdbc.Driver
</driver>
<driver>
com.mysql.jdbc.Driver
</driver>
<url>
jdbc:mysql://127.0.0.1:3306/cat
</url>
<url>
jdbc:mysql://127.0.0.1:3306/cat
</url>
<user>
root
</user>
<user>
root
</user>
<password>
password
</password>
<password>
root
</password>
<properties>
useUnicode=true
&
autoReconnect=true
</properties>
<properties>
useUnicode=true
&
autoReconnect=true
</properties>
</datasource>
</datasource>
<group
name=
"report"
package=
"com.dianping.cat.home.dal.report"
>
<group
name=
"report"
package=
"com.dianping.cat.home.dal.report"
>
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<table
name=
"daily_report_content"
/>
<table
name=
"daily_report_content"
/>
<table
name=
"monthly_report_content"
/>
<table
name=
"monthly_report_content"
/>
<table
name=
"weekly_report_content"
/>
<table
name=
"weekly_report_content"
/>
<table
name=
"alteration"
/>
</group>
</group>
<group
name=
"alarm"
package=
"com.dianping.cat.home.dal.alarm"
>
<group
name=
"alarm"
package=
"com.dianping.cat.home.dal.alarm"
>
<table
name=
"mailRecord"
/>
<table
name=
"mailRecord"
/>
...
...
cat-home/src/main/resources/META-INF/wizard/webapp/wizard.xml
浏览文件 @
d85fed09
...
@@ -55,6 +55,9 @@
...
@@ -55,6 +55,9 @@
</page>
</page>
<page
name=
"statistics"
title=
"Statistics"
path=
"statistics"
view=
"/jsp/report/bug/bug.jsp"
template=
"default"
>
<page
name=
"statistics"
title=
"Statistics"
path=
"statistics"
view=
"/jsp/report/bug/bug.jsp"
template=
"default"
>
<description>
Statistics
</description>
<description>
Statistics
</description>
</page>
<page
name=
"alteration"
title=
"Alteration"
path=
"alteration"
template=
"default"
>
<description>
Alteration
</description>
</page>
</page>
<page
name=
"monitor"
title=
"Monitor"
path=
"monitor"
template=
"default"
>
<page
name=
"monitor"
title=
"Monitor"
path=
"monitor"
template=
"default"
>
<description>
Monitor
</description>
<description>
Monitor
</description>
...
...
cat-home/src/main/webapp/jsp/report/alteration/alter_insertResult.jsp
0 → 100644
浏览文件 @
d85fed09
<%@ page
contentType=
"text/html; charset=utf-8"
%>
<jsp:useBean
id=
"model"
type=
"com.dianping.cat.report.page.alteration.Model"
scope=
"request"
/>
${model.insertResult}
cat-home/src/main/webapp/jsp/report/alteration/alter_query.jsp
0 → 100644
浏览文件 @
d85fed09
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ page
contentType=
"text/html; charset=utf-8"
%>
<div
class=
"text-left text-info"
></div>
时间粒度
<select
class=
"input-small"
id=
"granularity"
>
<option
value=
"120000"
>
2 min
</option>
<option
value=
"300000"
>
5 min
</option>
<option
value=
"600000"
>
10 min
</option>
<option
value=
"1800000"
>
30 min
</option>
<option
value=
"3600000"
>
1 hour
</option>
</select>
开始
<input
type=
"text"
name=
"startTime"
id=
"startTime"
value=
"
<fmt:formatDate
value=
"
${
payload
.
startTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
"
style=
"height:auto"
class=
"input-medium"
placeholder=
"格式如:2014-02-02 00:00:00"
>
结束
<input
type=
"text"
name=
"endTime"
id=
"endTime"
value=
"
<fmt:formatDate
value=
"
${
payload
.
endTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
"
style=
"height:auto"
class=
"input-medium"
placeholder=
"格式如:2014-02-02 00:00:00"
>
应用名
<input
type=
"text"
name=
"domain"
id=
"domain"
value=
"${payload.domain}"
style=
"height:auto"
class=
"input-small"
>
机器名
<input
type=
"text"
name=
"hostname"
id=
"hostname"
value=
"${payload.hostname}"
style=
"height:auto"
class=
"input-small"
>
<input
class=
"btn btn-primary btn-small"
value=
"查询"
onclick=
"queryNew()"
type=
"submit"
>
<c:if
test=
"
${
!
payload
.
fullScreen
}
"
>
<a
id=
"fullScreen"
class=
'btn btn-small btn-primary'
href=
"?fullScreen=true&refresh=${payload.refresh}&frequency=${payload.frequency}&startTime=
<fmt:formatDate
value=
"
${
payload
.
startTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&endTime=
<fmt:formatDate
value=
"
${
payload
.
endTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&granularity=${payload.granularity}"
>
全屏
</a>
</c:if>
<c:if
test=
"
${
payload
.
fullScreen
}
"
>
<a
id=
"fullScreen"
class=
'btn btn-small btn-primary'
href=
"?fullScreen=false&refresh=${payload.refresh}&frequency=${payload.frequency}&startTime=
<fmt:formatDate
value=
"
${
payload
.
startTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&endTime=
<fmt:formatDate
value=
"
${
payload
.
endTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&granularity=${payload.granularity}"
>
全屏
</a>
</c:if>
<a
id=
"refresh10"
class=
'btn btn-small btn-primary'
href=
"?fullScreen=${payload.fullScreen}&refresh=true&frequency=10&startTime=
<fmt:formatDate
value=
"
${
payload
.
startTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&endTime=
<fmt:formatDate
value=
"
${
payload
.
endTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&granularity=${payload.granularity}"
>
10秒定时刷新
</a>
<a
id=
"refresh20"
class=
'btn btn-small btn-primary'
href=
"?fullScreen=${payload.fullScreen}&refresh=true&frequency=20&startTime=
<fmt:formatDate
value=
"
${
payload
.
startTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&endTime=
<fmt:formatDate
value=
"
${
payload
.
endTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&granularity=${payload.granularity}"
>
20秒定时刷新
</a>
<a
id=
"refresh30"
class=
'btn btn-small btn-primary'
href=
"?fullScreen=${payload.fullScreen}&refresh=true&frequency=30&startTime=
<fmt:formatDate
value=
"
${
payload
.
startTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&endTime=
<fmt:formatDate
value=
"
${
payload
.
endTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&granularity=${payload.granularity}"
>
30秒定时刷新
</a>
<br>
<div
class=
"btn-group"
>
展示种类
<button
class=
"btn typeButton btn-primary"
id=
"puppetButton"
>
puppet
</button>
<button
class=
"btn typeButton btn-primary"
id=
"workflowButton"
>
workflow
</button>
<button
class=
"btn typeButton btn-primary"
id=
"lazymanButton"
>
lazyman
</button>
</div>
</div>
<script>
function
queryNew
(){
var
granularity
=
$
(
"
#granularity
"
).
val
();
var
startTime
=
$
(
"
#startTime
"
).
val
();
var
endTime
=
$
(
"
#endTime
"
).
val
();
var
domain
=
$
(
"
#domain
"
).
val
();
var
hostname
=
$
(
"
#hostname
"
).
val
();
window
.
location
.
href
=
"
?op=view&domain=
"
+
domain
+
"
&granularity=
"
+
granularity
+
"
&startTime=
"
+
startTime
+
"
&endTime=
"
+
endTime
+
"
&hostname=
"
+
hostname
;
}
</script>
cat-home/src/main/webapp/jsp/report/alteration/alter_view.jsp
0 → 100644
浏览文件 @
d85fed09
<%@ page
session=
"false"
language=
"java"
pageEncoding=
"UTF-8"
%>
<%@ 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"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<jsp:useBean
id=
"ctx"
type=
"com.dianping.cat.report.page.alteration.Context"
scope=
"request"
/>
<jsp:useBean
id=
"payload"
type=
"com.dianping.cat.report.page.alteration.Payload"
scope=
"request"
/>
<jsp:useBean
id=
"model"
type=
"com.dianping.cat.report.page.alteration.Model"
scope=
"request"
/>
<a:report
title=
"Alteration Report"
navUrlPrefix=
""
>
<jsp:body>
<res:useJs
value=
"
${
res
.
js
.
local
[
'highcharts.js'
]
}
"
target=
"head-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
[
'baseGraph.js'
]
}
"
target=
"head-js"
/>
<table
class=
"machines"
>
<tr>
<th>
<%@ include
file=
"alter_query.jsp"
%>
</th>
</tr>
</table>
<table
class=
"problem table table-striped table-bordered table-condensed table-hover"
style=
"width:100%;word-wrap: break-word; word-break: break-all;"
>
<tr
class=
"text-success"
>
<th
width=
"15%"
>
时间
</th>
<th
width=
"28%"
class=
"puppet"
>
puppet
</th>
<th
width=
"28%"
class=
"workflow"
>
workflow
</th>
<th
width=
"28%"
class=
"lazyman"
>
lazyman
</th>
</tr>
<c:forEach
var=
"barrelMap"
items=
"
${
model
.
barrels
}
"
varStatus=
"typeIndex"
>
<c:set
var=
"barrel"
value=
"
${
barrelMap
.
value
}
"
/>
<tr
style=
"width:85%"
>
<td
width=
"10%"
>
${barrel.startTime}
</br>
${barrel.endTime}
</td>
<td
width=
"30%"
class=
"puppet"
>
<table
class=
"table table-striped table-bordered table-condensed table-hover"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr
class=
"text-success"
>
<th
width=
"100%"
>
标题
</th>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'puppet'
]
}
"
varStatus=
"index"
begin=
"0"
end=
"
${
payload
.
rows
-
1
}
"
>
<tr>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
</tr>
</c:forEach>
<c:if
test=
"
${
fn:
length
(
barrel
.
alterationMap
[
'puppet'
])>
payload
.
rows
}
"
>
<tr
class=
'showMenu'
id=
'${barrel.key}_show'
style=
"display:table-row;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: show all ::]
</a></td>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'puppet'
]
}
"
varStatus=
"index"
begin=
"
${
payload
.
rows
}
"
>
<tr
style=
"display:none;"
class=
'${barrel.key}_content'
>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
</c:forEach>
<tr
class=
'hideMenu'
id=
'${barrel.key}_hide'
style=
"display:none;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: hide ::]
</a></td>
</tr>
</c:if>
</table>
</td>
<td
width=
"30%"
class=
"workflow"
>
<table
class=
"table table-striped table-bordered table-condensed table-hover"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr
class=
"text-success"
>
<th
width=
"100%"
>
标题
</th>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'workflow'
]
}
"
varStatus=
"index"
begin=
"0"
end=
"
${
payload
.
rows
-
1
}
"
>
<tr>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
</tr>
</c:forEach>
<c:if
test=
"
${
fn:
length
(
barrel
.
alterationMap
[
'workflow'
])>
payload
.
rows
}
"
>
<tr
class=
'showMenu'
id=
'${barrel.key}_show'
style=
"display:table-row;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: show all ::]
</a></td>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'workflow'
]
}
"
varStatus=
"index"
begin=
"
${
payload
.
rows
}
"
>
<tr
style=
"display:none;"
class=
'${barrel.key}_content'
>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
</tr>
</c:forEach>
<tr
class=
'hideMenu'
id=
'${barrel.key}_hide'
style=
"display:none;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: hide ::]
</a></td>
</tr>
</c:if>
</table>
</td>
<td
width=
"30%"
class=
"lazyman"
>
<table
class=
"table table-striped table-bordered table-condensed table-hover"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr
class=
"text-success"
>
<th
width=
"100%"
>
标题
</th>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'lazyman'
]
}
"
varStatus=
"index"
begin=
"0"
end=
"
${
payload
.
rows
-
1
}
"
>
<tr>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
</tr>
</c:forEach>
<c:if
test=
"
${
fn:
length
(
barrel
.
alterationMap
[
'lazyman'
])>
payload
.
rows
}
"
>
<tr
class=
'showMenu'
id=
'${barrel.key}_show'
style=
"display:table-row;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: show all ::]
</a></td>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'lazyman'
]
}
"
varStatus=
"index"
begin=
"
${
payload
.
rows
}
"
>
<tr
style=
"display:none;"
class=
'${barrel.key}_content'
>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
</c:forEach>
<tr
class=
'hideMenu'
id=
'${barrel.key}_hide'
style=
"display:none;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: hide ::]
</a></td>
</tr>
</c:if>
</table>
</td>
</tr>
</c:forEach>
</table>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
"
.header
"
).
hide
();
$
(
'
i[tips]
'
).
popover
();
<c:if
test=
"
${
payload
.
fullScreen
}
"
>
$
(
'
#fullScreen
'
).
addClass
(
'
btn-danger
'
);
$
(
'
.navbar
'
).
hide
();
$
(
'
.footer
'
).
hide
();
</c:if>
<c:if
test=
"
${
!
payload
.
fullScreen
}
"
>
$
(
'
#fullScreen
'
).
removeClass
(
'
btn-danger
'
);
$
(
'
.navbar
'
).
show
();
$
(
'
.footer
'
).
show
();
</c:if>
$
(
"
.typeButton
"
).
click
(
function
(){
var
type
=
"
.
"
+
this
.
id
.
replace
(
"
Button
"
,
""
);
$
(
this
).
toggleClass
(
"
btn-primary
"
);
if
(
$
(
type
).
css
(
"
display
"
)
==
"
block
"
){
$
(
type
).
css
(
"
display
"
,
"
none
"
);
}
else
{
$
(
type
).
css
(
"
display
"
,
"
block
"
);
}
})
$
(
"
.showMenu
"
).
click
(
function
(){
var
timeStamp
=
this
.
id
.
replace
(
"
_show
"
,
""
);
var
content
=
"
.
"
+
timeStamp
+
"
_content
"
;
var
hide
=
"
#
"
+
timeStamp
+
"
_hide
"
;
$
(
this
).
css
(
"
display
"
,
"
none
"
);
$
(
content
).
css
(
"
display
"
,
"
table-row
"
);
$
(
hide
).
css
(
"
display
"
,
"
table-row
"
);
})
$
(
"
.hideMenu
"
).
click
(
function
(){
var
timeStamp
=
this
.
id
.
replace
(
"
_hide
"
,
""
);
var
content
=
"
.
"
+
timeStamp
+
"
_content
"
;
var
show
=
"
#
"
+
timeStamp
+
"
_show
"
;
$
(
this
).
css
(
"
display
"
,
"
none
"
);
$
(
content
).
css
(
"
display
"
,
"
none
"
);
$
(
show
).
css
(
"
display
"
,
"
table-row
"
);
})
var
refresh
=
$
{
payload
.
refresh
};
var
frequency
=
$
{
payload
.
frequency
};
if
(
refresh
){
$
(
'
#refresh${payload.frequency}
'
).
addClass
(
'
btn-danger
'
);
setInterval
(
function
(){
location
.
reload
();
},
frequency
*
1000
);
};
var
value
=
$
{
payload
.
granularity
};
$
(
"
#granularity
"
).
val
(
value
);
});
</script>
<res:useJs
value=
"
${
res
.
js
.
local
.
problem_js
}
"
target=
"buttom-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
.
problemHistory_js
}
"
target=
"bottom-js"
/>
</jsp:body>
</a:report>
\ No newline at end of file
cat-home/src/main/webapp/jsp/report/alteration/alter_view_backup.jsp
0 → 100644
浏览文件 @
d85fed09
<%@ page
session=
"false"
language=
"java"
pageEncoding=
"UTF-8"
%>
<%@ 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"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<jsp:useBean
id=
"ctx"
type=
"com.dianping.cat.report.page.alteration.Context"
scope=
"request"
/>
<jsp:useBean
id=
"payload"
type=
"com.dianping.cat.report.page.alteration.Payload"
scope=
"request"
/>
<jsp:useBean
id=
"model"
type=
"com.dianping.cat.report.page.alteration.Model"
scope=
"request"
/>
<a:report
title=
"Alteration Report"
navUrlPrefix=
""
>
<jsp:body>
<res:useJs
value=
"
${
res
.
js
.
local
[
'highcharts.js'
]
}
"
target=
"head-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
[
'baseGraph.js'
]
}
"
target=
"head-js"
/>
<table
class=
"machines"
>
<tr>
<th>
<%@ include
file=
"alter_query.jsp"
%>
</th>
</tr>
</table>
<table
class=
"problem table table-striped table-bordered table-condensed table-hover"
style=
"width:100%;word-wrap: break-word; word-break: break-all;"
>
<tr
class=
"text-success"
>
<th
width=
"15%"
>
时间
</th>
<th
width=
"28%"
class=
"puppet"
>
puppet
</th>
<th
width=
"28%"
class=
"workflow"
>
workflow
</th>
<th
width=
"28%"
class=
"lazyman"
>
lazyman
</th>
</tr>
<c:forEach
var=
"barrelMap"
items=
"
${
model
.
barrels
}
"
varStatus=
"typeIndex"
>
<c:set
var=
"barrel"
value=
"
${
barrelMap
.
value
}
"
/>
<tr
style=
"width:85%"
>
<td
width=
"10%"
>
${barrel.startTime}
</br>
${barrel.endTime}
</td>
<td
width=
"30%"
class=
"puppet"
>
<table
class=
"table table-striped table-bordered table-condensed table-hover"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr
class=
"text-success"
>
<th
width=
"20%"
>
标题
</th>
<th
width=
"5%"
>
类型
</th>
<th
width=
"5%"
>
应用
</th>
<th
width=
"8%"
>
主机名
</th>
<th
width=
"10%"
>
变更时间
</th>
<th
width=
"5%"
>
变更用户
</th>
<th
width=
"5%"
>
详情
</th>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'puppet'
]
}
"
varStatus=
"index"
begin=
"0"
end=
"9"
>
<tr>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
<td
class=
"alertation${item.type}"
>
${item.type}
</td>
<td
>
${item.domain}
</td>
<td
>
${item.hostname}
</td>
<td
>
${item.date}
</td>
<td
>
${item.user}
</td>
<td
>
<c:if
test=
" ${empty item.url}"
>
<a
href=
"${item.url}"
>
link
</a>
</c:if>
</td>
</tr>
</c:forEach>
<c:if
test=
"
${
fn:
length
(
barrel
.
alterationMap
[
'puppet'
])>
10
}
"
>
<tr
class=
'showMenu'
id=
'${barrel.key}_show'
style=
"display:table-row;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: show all ::]
</a></td>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'puppet'
]
}
"
varStatus=
"index"
begin=
"10"
>
<tr
style=
"display:none;"
class=
'${barrel.key}_content'
>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
<td
class=
"alertation${item.type}"
>
${item.type}
</td>
<td
>
${item.domain}
</td>
<td
>
${item.hostname}
</td>
<td
>
${item.date}
</td>
<td
>
${item.user}
</td>
<td
>
<c:if
test=
" ${empty item.url}"
>
<a
href=
"${item.url}"
>
link
</a>
</c:if>
</td>
</tr>
</c:forEach>
<tr
class=
'hideMenu'
id=
'${barrel.key}_hide'
style=
"display:none;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: hide ::]
</a></td>
</tr>
</c:if>
</table>
</td>
<td
width=
"30%"
class=
"workflow"
>
<table
class=
"table table-striped table-bordered table-condensed table-hover"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr
class=
"text-success"
>
<th
width=
"20%"
>
标题
</th>
<th
width=
"5%"
>
类型
</th>
<th
width=
"5%"
>
应用
</th>
<th
width=
"8%"
>
主机名
</th>
<th
width=
"10%"
>
变更时间
</th>
<th
width=
"5%"
>
变更用户
</th>
<th
width=
"5%"
>
详情
</th>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'workflow'
]
}
"
varStatus=
"index"
begin=
"0"
end=
"9"
>
<tr>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
<td
class=
"alertation${item.type}"
>
${item.type}
</td>
<td
>
${item.domain}
</td>
<td
>
${item.hostname}
</td>
<td
>
${item.date}
</td>
<td
>
${item.user}
</td>
<td
>
<c:if
test=
" ${empty item.url}"
>
<a
href=
"${item.url}"
>
link
</a>
</c:if>
</td>
</tr>
</c:forEach>
<c:if
test=
"
${
fn:
length
(
barrel
.
alterationMap
[
'workflow'
])>
10
}
"
>
<tr
class=
'showMenu'
id=
'${barrel.key}_show'
style=
"display:table-row;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: show all ::]
</a></td>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'workflow'
]
}
"
varStatus=
"index"
begin=
"10"
>
<tr
style=
"display:none;"
class=
'${barrel.key}_content'
>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
<td
class=
"alertation${item.type}"
>
${item.type}
</td>
<td
>
${item.domain}
</td>
<td
>
${item.hostname}
</td>
<td
>
${item.date}
</td>
<td
>
${item.user}
</td>
<td
>
<c:if
test=
" ${empty item.url}"
>
<a
href=
"${item.url}"
>
link
</a>
</c:if>
</td>
</tr>
</c:forEach>
<tr
class=
'hideMenu'
id=
'${barrel.key}_hide'
style=
"display:none;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: hide ::]
</a></td>
</tr>
</c:if>
</table>
</td>
<td
width=
"30%"
class=
"lazyman"
>
<table
class=
"table table-striped table-bordered table-condensed table-hover"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr
class=
"text-success"
>
<th
width=
"20%"
>
标题
</th>
<th
width=
"5%"
>
类型
</th>
<th
width=
"5%"
>
应用
</th>
<th
width=
"8%"
>
主机名
</th>
<th
width=
"10%"
>
变更时间
</th>
<th
width=
"5%"
>
变更用户
</th>
<th
width=
"5%"
>
详情
</th>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'lazyman'
]
}
"
varStatus=
"index"
begin=
"0"
end=
"9"
>
<tr>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
<td
class=
"alertation${item.type}"
>
${item.type}
</td>
<td
>
${item.domain}
</td>
<td
>
${item.hostname}
</td>
<td
>
${item.date}
</td>
<td
>
${item.user}
</td>
<td
>
<c:if
test=
" ${empty item.url}"
>
<a
href=
"${item.url}"
>
link
</a>
</c:if>
</td>
</tr>
</c:forEach>
<c:if
test=
"
${
fn:
length
(
barrel
.
alterationMap
[
'lazyman'
])>
10
}
"
>
<tr
class=
'showMenu'
id=
'${barrel.key}_show'
style=
"display:table-row;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: show all ::]
</a></td>
</tr>
<c:forEach
var=
"item"
items=
"
${
barrel
.
alterationMap
[
'lazyman'
]
}
"
varStatus=
"index"
begin=
"10"
>
<tr
style=
"display:none;"
class=
'${barrel.key}_content'
>
<td
class=
"text-info"
>
<i
tips=
""
data-trigger=
"hover"
class=
"icon-question-sign"
data-toggle=
"popover"
data-placement=
"top"
data-content=
"${item.content}"
></i>
${item.title}
</td>
<td
class=
"alertation${item.type}"
>
${item.type}
</td>
<td
>
${item.domain}
</td>
<td
>
${item.hostname}
</td>
<td
>
${item.date}
</td>
<td
>
${item.user}
</td>
<td
>
<c:if
test=
" ${empty item.url}"
>
<a
href=
"${item.url}"
>
link
</a>
</c:if>
</td>
</tr>
</c:forEach>
<tr
class=
'hideMenu'
id=
'${barrel.key}_hide'
style=
"display:none;"
>
<td><a
href=
''
onclick=
"return false"
>
[:: hide ::]
</a></td>
</tr>
</c:if>
</table>
</td>
</tr>
</c:forEach>
</table>
<c:if
test=
"
${
model
.
totalPages
>
1
}
"
>
<div
class=
"pagination pagination-centered"
>
<ul>
<c:forEach
varStatus=
"idx"
begin=
"1"
end=
"
${
model
.
totalPages
}
"
>
<li
id=
'page${idx.index}'
><a
href=
"?fullScreen=${payload.fullScreen}&refresh=true&frequency=30&startTime=
<fmt:formatDate
value=
"
${
payload
.
startTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&endTime=
<fmt:formatDate
value=
"
${
payload
.
endTime
}
"
pattern=
"yyyy-MM-dd HH:mm:ss"
/>
&granularity=${payload.granularity}&pages=${idx.index}"
>
${idx.index}
</a></li>
</c:forEach>
</ul>
</div>
</c:if>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
"
.header
"
).
hide
();
$
(
'
i[tips]
'
).
popover
();
<c:if
test=
"
${
payload
.
fullScreen
}
"
>
$
(
'
#fullScreen
'
).
addClass
(
'
btn-danger
'
);
$
(
'
.navbar
'
).
hide
();
$
(
'
.footer
'
).
hide
();
</c:if>
<c:if
test=
"
${
!
payload
.
fullScreen
}
"
>
$
(
'
#fullScreen
'
).
removeClass
(
'
btn-danger
'
);
$
(
'
.navbar
'
).
show
();
$
(
'
.footer
'
).
show
();
</c:if>
<c:if
test=
"
${
model
.
totalPages
>
1
}
"
>
$
(
'
#page
'
+
$
{
payload
.
pages
}).
addClass
(
'
active
'
)
</c:if>
$
(
"
.showMenu
"
).
click
(
function
(){
var
timeStamp
=
this
.
id
.
replace
(
"
_show
"
,
""
);
var
content
=
"
.
"
+
timeStamp
+
"
_content
"
;
var
hide
=
"
#
"
+
timeStamp
+
"
_hide
"
;
$
(
this
).
css
(
"
display
"
,
"
none
"
);
$
(
content
).
css
(
"
display
"
,
"
table-row
"
);
$
(
hide
).
css
(
"
display
"
,
"
table-row
"
);
})
$
(
"
.hideMenu
"
).
click
(
function
(){
var
timeStamp
=
this
.
id
.
replace
(
"
_hide
"
,
""
);
var
content
=
"
.
"
+
timeStamp
+
"
_content
"
;
var
show
=
"
#
"
+
timeStamp
+
"
_show
"
;
$
(
this
).
css
(
"
display
"
,
"
none
"
);
$
(
content
).
css
(
"
display
"
,
"
none
"
);
$
(
show
).
css
(
"
display
"
,
"
table-row
"
);
})
var
refresh
=
$
{
payload
.
refresh
};
var
frequency
=
$
{
payload
.
frequency
};
if
(
refresh
){
$
(
'
#refresh${payload.frequency}
'
).
addClass
(
'
btn-danger
'
);
setInterval
(
function
(){
location
.
reload
();
},
frequency
*
1000
);
};
var
value
=
$
{
payload
.
granularity
};
$
(
"
#granularity
"
).
val
(
value
);
});
</script>
<res:useJs
value=
"
${
res
.
js
.
local
.
problem_js
}
"
target=
"buttom-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
.
problemHistory_js
}
"
target=
"bottom-js"
/>
</jsp:body>
</a:report>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录