Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
javalover123888
SkyWalking
提交
f8a17db5
S
SkyWalking
项目概览
javalover123888
/
SkyWalking
与 Fork 源项目一致
Fork自
山不在高_有仙则灵 / SkyWalking
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f8a17db5
编写于
5月 11, 2016
作者:
A
ascrutae
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交部分代码
上级
59d3f15d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
94 addition
and
89 deletion
+94
-89
skywalking-webui/src/main/java/com/ai/cloud/skywalking/web/dto/TypicalCallTree.java
...java/com/ai/cloud/skywalking/web/dto/TypicalCallTree.java
+6
-0
skywalking-webui/src/main/java/com/ai/cloud/skywalking/web/dto/TypicalCallTreeNode.java
.../com/ai/cloud/skywalking/web/dto/TypicalCallTreeNode.java
+13
-4
skywalking-webui/src/main/java/com/ai/cloud/skywalking/web/service/impl/AnalysisResultService.java
...ud/skywalking/web/service/impl/AnalysisResultService.java
+1
-0
skywalking-webui/src/main/webapp/bower_components/skywalking/js/analysisResultViewResovler.js
...er_components/skywalking/js/analysisResultViewResovler.js
+28
-16
skywalking-webui/src/main/webapp/pages/anls-result/analysisResult.ftl
...ebui/src/main/webapp/pages/anls-result/analysisResult.ftl
+44
-69
skywalking-webui/src/main/webapp/pages/main.ftl
skywalking-webui/src/main/webapp/pages/main.ftl
+2
-0
未找到文件。
skywalking-webui/src/main/java/com/ai/cloud/skywalking/web/dto/TypicalCallTree.java
浏览文件 @
f8a17db5
...
...
@@ -19,4 +19,10 @@ public class TypicalCallTree {
public
void
addNode
(
TypicalCallTreeNode
typicalCallTreeNode
)
{
this
.
treeNodes
.
put
(
typicalCallTreeNode
.
getNodeToken
(),
typicalCallTreeNode
);
}
public
void
beautifulViewPointForShow
()
{
for
(
Map
.
Entry
<
String
,
TypicalCallTreeNode
>
entry
:
treeNodes
.
entrySet
())
{
entry
.
getValue
().
beautifulViewPoint
();
}
}
}
skywalking-webui/src/main/java/com/ai/cloud/skywalking/web/dto/TypicalCallTreeNode.java
浏览文件 @
f8a17db5
...
...
@@ -9,20 +9,29 @@ import com.ai.cloud.skywalking.web.util.TokenGenerator;
public
class
TypicalCallTreeNode
{
private
String
nodeToken
;
private
String
viewPoint
;
private
String
levelId
;
private
String
viewPointStr
;
private
String
traceLevelId
;
public
TypicalCallTreeNode
(
String
parentLevelId
,
String
levelId
,
String
viewPoint
)
{
if
(
StringUtil
.
isBlank
(
parentLevelId
)){
this
.
l
evelId
=
levelId
;
this
.
traceL
evelId
=
levelId
;
}
else
{
this
.
l
evelId
=
parentLevelId
+
"."
+
levelId
;
this
.
traceL
evelId
=
parentLevelId
+
"."
+
levelId
;
}
this
.
viewPoint
=
viewPoint
;
nodeToken
=
TokenGenerator
.
generate
(
levelId
+
":"
+
viewPoint
);
this
.
viewPointStr
=
viewPoint
;
nodeToken
=
TokenGenerator
.
generate
(
this
.
traceLevelId
+
":"
+
viewPoint
);
}
public
String
getNodeToken
()
{
return
nodeToken
;
}
public
void
beautifulViewPoint
()
{
if
(!
StringUtil
.
isBlank
(
viewPoint
)
&&
viewPoint
.
length
()
>
80
)
{
viewPoint
=
viewPoint
.
substring
(
0
,
50
)
+
"..."
+
viewPoint
.
substring
(
viewPoint
.
length
()
-
50
);
}
}
}
skywalking-webui/src/main/java/com/ai/cloud/skywalking/web/service/impl/AnalysisResultService.java
浏览文件 @
f8a17db5
...
...
@@ -99,6 +99,7 @@ public class AnalysisResultService implements IAnalysisResultService {
List
<
TypicalCallTree
>
typicalCallTrees
=
new
ArrayList
<
TypicalCallTree
>();
for
(
String
callTreeId
:
typicalCallTreeIds
)
{
TypicalCallTree
typicalCallTree
=
typicalCallTreeDao
.
queryCallChainTree
(
callTreeId
);
typicalCallTree
.
beautifulViewPointForShow
();
typicalCallTrees
.
add
(
typicalCallTree
);
}
...
...
skywalking-webui/src/main/webapp/bower_components/skywalking/js/analysisResultViewResovler.js
浏览文件 @
f8a17db5
...
...
@@ -27,15 +27,13 @@ AnalysisResultViewResolver.prototype.bindEvent = function () {
}
AnalysisResultViewResolver
.
prototype
.
callChainTreeData
=
[];
AnalysisResultViewResolver
.
prototype
.
callEntrance
=
{};
AnalysisResultViewResolver
.
prototype
.
typicCallChainData
=
[];
AnalysisResultViewResolver
.
prototype
.
currentTypicalTreeNodeMapping
=
[];
AnalysisResultViewResolver
.
prototype
.
currentTypicalTreeNodes
=
{
callChainTreeNodeList
:[]};
AnalysisResultViewResolver
.
prototype
.
currentTypicalTreeNodeMapping
=
{
typicalTreeIds
:[]};
AnalysisResultViewResolver
.
prototype
.
showTypicalCallTree
=
function
(
nodeToken
)
{
for
(
var
i
=
0
;
i
<
this
.
typicCallChainData
.
length
;
i
++
)
{
var
node
=
this
.
typicCallChainData
[
i
];
var
tmpInfo
=
node
.
treeNodes
[
nodeToken
];
...
...
@@ -43,18 +41,16 @@ AnalysisResultViewResolver.prototype.showTypicalCallTree = function (nodeToken)
continue
;
}
var
tmpTypicalCallChain
=
{};
tmpTypicalCallChain
.
callTreeId
=
node
.
callTreeId
;
var
tmpTypicalCallChain
=
[];
for
(
var
key
in
node
.
treeNodes
)
{
var
tmpNode
=
node
.
treeNodes
[
key
];
tmpNode
.
analyResult
=
JSON
.
parse
(
$
(
"
#
"
+
key
).
text
());
tmpTypicalCallChain
.
nodes
.
push
(
tmpNode
);
tmpNode
.
anlyResult
=
JSON
.
parse
(
$
(
"
#
"
+
key
).
text
());
tmpTypicalCallChain
.
push
(
key
);
this
.
currentTypicalTreeNodes
.
callChainTreeNodeList
.
push
(
tmpNode
);
}
this
.
currentTypicalTreeNodeMapping
.
push
(
tmpTypicalCallChain
);
this
.
currentTypicalTreeNodeMapping
[
node
.
callTreeId
]
=
tmpTypicalCallChain
;
this
.
currentTypicalTreeNodeMapping
.
typicalTreeIds
.
push
(
node
.
callTreeId
);
}
alert
(
currentTypicalTreeNodeMapping
);
}
AnalysisResultViewResolver
.
prototype
.
loadData
=
function
(
analyType
,
analyDate
)
{
...
...
@@ -84,6 +80,26 @@ AnalysisResultViewResolver.prototype.loadData = function (analyType, analyDate)
var
htmlOutput
=
template
.
render
({});
$
(
"
#mainPanel
"
).
empty
();
$
(
"
#mainPanel
"
).
html
(
htmlOutput
);
template
=
$
.
templates
(
"
#typicalTreeCheckBoxTmpl
"
);
htmlOutput
=
template
.
render
({
"
typicalTreeIds
"
:
self
.
currentTypicalTreeNodeMapping
.
typicalTreeIds
});
alert
(
htmlOutput
);
$
(
"
#typicalCheckBoxDiv
"
).
empty
();
$
(
"
#typicalCheckBoxDiv
"
).
html
(
htmlOutput
);
$
(
"
input[name='typicalTreeCheckBox']
"
).
each
(
function
(){
$
(
this
).
change
(
function
(){
var
treeIds
=
new
Array
();
$
(
"
input[name='typicalTreeCheckBox']
"
).
each
(
function
(){
});
});
});
template
=
$
.
templates
(
"
#typicalTreeTableTmpl
"
);
var
htmlOutput
=
template
.
render
((
self
.
convertAnalysisResult
(
self
.
currentTypicalTreeNodes
)));
$
(
"
#typicalTreeTableDataBody
"
).
empty
();
$
(
"
#typicalTreeTableDataBody
"
).
html
(
htmlOutput
);
})
});
}
...
...
@@ -122,10 +138,6 @@ AnalysisResultViewResolver.prototype.convertAnalysisResult = function (originDat
var
flag
=
false
;
for
(
var
i
=
0
;
i
<
originData
.
callChainTreeNodeList
.
length
;
i
++
)
{
var
node
=
originData
.
callChainTreeNodeList
[
i
];
if
(
node
.
traceLevelId
==
"
0
"
)
{
self
.
callEntrance
=
node
;
}
if
(
previousNodeLevelId
==
node
.
traceLevelId
)
{
if
(
count
==
1
)
{
index
=
i
-
1
;
...
...
skywalking-webui/src/main/webapp/pages/anls-result/analysisResult.ftl
浏览文件 @
f8a17db5
...
...
@@ -46,12 +46,13 @@
</table>
</div>
<hr/>
</script>
</#macro>
<#macro analysisResultTableTmpl>
<script type="text/x-jsrender" id="analysisResultTableTmpl">
<tr
id="a"
>
<tr>
{{if isPrintLevelId}}
<td rowspan="{{>rowSpanCount}}" valign="middle">{{>traceLevelId}}</td>
{{/if}}
...
...
@@ -99,6 +100,7 @@
<span id="{{>nodeToken}}" style="display:none">{{>anlyResultStr}}</span></td>
</tr>
</script>
</#macro>
...
...
@@ -114,11 +116,7 @@
<br/>
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<span> 归属该节点下所有的典型调用链:</span>
<input type="checkbox"/>典型调用链1
<input type="checkbox">典型调用链2</input>
<input type="checkbox">典型调用链3</input>
<div class="row" id="typicalCheckBoxDiv">
</div>
<br/>
<table class="gridtable" style="width:100%;">
...
...
@@ -126,79 +124,56 @@
<tr>
<th>LevelId</th>
<th>ViewPoint</th>
<th>应用</th>
<th>调用次数</th>
<th>正确次数</th>
<th>错误次数</th>
<th>正确率</th>
<th>平均耗时</th>
</tr>
</thead>
<tbody id="dataBody">
<tr id="a">
<td>0</td>
<td>Http://localhost:8080/order/save1</td>
<td>Order-Application</td>
<td>100</td>
<td>100</td>
<td>0</td>
<td>100%</td>
<td>20.0ms</td>
</tr>
<tr id="b">
<td valign="middle">0.0</td>
<td> <a id="popBtn" data-toggle="modal" data-target="#myModal">com.ai.aisse.core.service.impl...taServiceImpl.SynchAisseData()</a></td>
<td>Account-Application</td>
<td>100</td>
<td>100</td>
<td>0</td>
<td>100%</td>
<td>20.0ms</td>
</tr>
<tr id="c">
<td valign="middle">0.0</td>
<td> <a>com.ai.aisse.core.dao.impl.Syn...taDaoImpl.queryAppAisseTimer()</a></td>
<td>Biling-Application</td>
<td>100</td>
<td>100</td>
<td>0</td>
<td>100%</td>
<td>20.0ms</td>
</tr>
<tr id="d">
<td>0.2</td>
<td> <a>tracing:jdbc:oracle:thin:@10.1.1.61:1521:OAPROD(aisse)</a></td>
<td>Order-Application</td>
<td>100</td>
<td>100</td>
<td>0</td>
<td>100%</td>
<td>20.0ms</td>
</tr>
<tr id="e">
<td valign="middle">0.3</td>
<td> <a>com.ai.aisse.core.dao.impl.Syn...AisseTimer(java.sql.Timestamp)</a></td>
<td>Order-Application</td>
<td>100</td>
<td>100</td>
<td>0</td>
<td>100%</td>
<td>20.0ms</td>
</tr>
<tr id="f">
<td valign="middle">0.0</td>
<td> <a>tracing:jdbc:oracle:thin:@10.1.1.61:1521:OAPROD(aisse)</a></td>
<td>Order-Application</td>
<td>100</td>
<td>100</td>
<td>0</td>
<td>100%</td>
<td>20.0ms</td>
</tr>
<tbody id="typicalTreeTableDataBody">
</tbody>
</table>
</div>
</div>
</script>
</#macro>
<#macro typicalCallChainCheckBox>
<script type="text/x-jsrender" id="typicalTreeCheckBoxTmpl">
<span> 归属该节点下所有的典型调用链:</span>
{{for typicalTreeIds}}
<input name="typicalTreeCheckBox" type="checkbox" checked/>典型调用链{{: #index}}
{{/for}}
</script>
</#macro>
<#macro typicalCallChainTreeTable>
<script type="text/x-jsrender" id="typicalTreeTableTmpl">
<tr>
{{if isPrintLevelId}}
<td rowspan="{{>rowSpanCount}}" valign="middle">{{>traceLevelId}}</td>
{{/if}}
<td>
<a href="javascript:void(0);" data-toggle="modal" data-target="#modal{{>nodeToken}}">{{>viewPoint}}</a>
</td>
<td>{{>anlyResult.totalCall}}</td>
<td>{{>anlyResult.correctNumber}}</td>
<td>
<span class="
{{if anlyResult.correctRate >= 99.00}}
text-success
{{else anlyResult.correctRate >= 97}}
text-warning
{{else}}
text-danger
{{/if}}
">
<strong>{{>anlyResult.correctRate}}%</strong></span></td>
<td>{{>anlyResult.averageCost}}ms
<span id="{{>nodeToken}}" style="display:none">{{>anlyResultStr}}</span></td>
</tr>
</script>
</#macro>
...
...
skywalking-webui/src/main/webapp/pages/main.ftl
浏览文件 @
f8a17db5
...
...
@@ -46,6 +46,8 @@
<
@
anlyResult.analysisResult
/>
<
@
anlyResult.analysisResultTableTmpl
/>
<
@
anlyResult.typicalCallChainTrees
/>
<
@
anlyResult.typicalCallChainTreeTable
/>
<
@
anlyResult.typicalCallChainCheckBox
/>
<p
id=
"baseUrl"
style=
"display: none"
>
${_base}
</p>
<div
class=
"container"
id=
"mainPanel"
>
<p
id=
"searchType"
style=
"display: none"
>
${searchType!''}
</p>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录