提交 59d3f15d 编写于 作者: A ascrutae

1. 提交部分代码

上级 1dd34903
......@@ -5,6 +5,8 @@ import com.ai.cloud.skywalking.web.dto.TypicalCallTree;
import com.ai.cloud.skywalking.web.dto.TypicalCallTreeNode;
import com.ai.cloud.skywalking.web.util.HBaseUtils;
import com.alibaba.fastjson.JSONArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Get;
......@@ -50,9 +52,12 @@ public class TypicalCallTreeDaoImpl implements ITypicalCallTreeDao {
}
TypicalCallTree callTree = new TypicalCallTree(callTreeId);
for (Cell cell : r.rawCells()) {
String levelId = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());
String viewPoint = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
callTree.addNode(new TypicalCallTreeNode(levelId, viewPoint));
String valueStr = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
JsonObject jsonObject = (JsonObject) new JsonParser().parse(valueStr);
//TypicalCallTreeNode node = new Gson().fromJson(valueStr, TypicalCallTreeNode.class);
TypicalCallTreeNode node = new TypicalCallTreeNode(jsonObject.get("parentLevelId").getAsString(),
jsonObject.get("levelId").getAsString(), jsonObject.get("viewPoint").getAsString());
callTree.addNode(node);
}
return callTree;
}
......
......@@ -17,18 +17,20 @@ public class CallChainTreeNode {
private String nodeToken;
private String traceLevelId;
private String viewPoint;
private String viewPointStr;
private AnlyResult anlyResult;
public CallChainTreeNode(String qualifierStr, String valueStr, String loadKey) {
traceLevelId = qualifierStr.substring(0, qualifierStr.indexOf("@"));
viewPoint = qualifierStr.substring(qualifierStr.indexOf("@") + 1);
viewPointStr = viewPoint;
nodeToken = TokenGenerator.generate(traceLevelId + ":" + viewPoint);
JsonObject jsonObject = (JsonObject) new JsonParser().parse(valueStr);
Map<String, AnlyResult> resultMap = new Gson().fromJson(jsonObject.getAsJsonObject("summaryValueMap"),
new TypeToken<Map<String, AnlyResult>>() {
}.getType());
anlyResult = resultMap.get(loadKey);
if (anlyResult == null){
if (anlyResult == null) {
anlyResult = new AnlyResult();
}
}
......
package com.ai.cloud.skywalking.web.dto;
import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import java.util.Map;
/**
* Created by xin on 16-4-28.
*/
public class TypicalCallTree {
private String callTreeId;
private List<TypicalCallTreeNode> treeNodes;
private Map<String, TypicalCallTreeNode> treeNodes;
public TypicalCallTree(String callTreeId) {
this.callTreeId = callTreeId;
this.treeNodes = new ArrayList<TypicalCallTreeNode>();
this.treeNodes = new HashMap<String, TypicalCallTreeNode>();
}
public void addNode(TypicalCallTreeNode typicalCallTreeNode) {
this.treeNodes.add(typicalCallTreeNode);
this.treeNodes.put(typicalCallTreeNode.getNodeToken(), typicalCallTreeNode);
}
}
package com.ai.cloud.skywalking.web.dto;
import com.ai.cloud.skywalking.web.util.StringUtil;
import com.ai.cloud.skywalking.web.util.TokenGenerator;
/**
......@@ -7,13 +8,21 @@ import com.ai.cloud.skywalking.web.util.TokenGenerator;
*/
public class TypicalCallTreeNode {
private String nodeToken;
private String viewPoint;
private String levelId;
private String viewpoint;
public TypicalCallTreeNode(String parentLevelId, String levelId, String viewPoint) {
if (StringUtil.isBlank(parentLevelId)){
this.levelId = levelId;
}else{
this.levelId = parentLevelId + "." + levelId;
}
public TypicalCallTreeNode(String levelId, String viewPoint) {
this.levelId = levelId;
this.viewpoint = viewPoint;
this.nodeToken = TokenGenerator.generate(levelId + ":" + viewPoint);
this.viewPoint = viewPoint;
nodeToken = TokenGenerator.generate(levelId + ":" + viewPoint);
}
public String getNodeToken() {
return nodeToken;
}
}
......@@ -19,7 +19,11 @@ public class ViewPointBeautiUtil {
if (index == -1) {
return viewPoint;
}
StringBuilder result = new StringBuilder(viewPoint.substring(0, index - 1));
StringBuilder result = new StringBuilder();
if (index > 0) {
result = new StringBuilder(viewPoint.substring(0, index - 1));
}
result.append("<span class='highlight-viewpoint'>");
result.append(searchKey);
result.append("</span>");
......@@ -57,15 +61,4 @@ public class ViewPointBeautiUtil {
return result.toString();
}
public static void main(String[] args) {
List<String> list = new ArrayList<>();
list.add("tracing:jdbc:oracle:thin:@10.1.1.61:1521:OAPROD(aisse)preaparedStatement.executeQuery:select a.ACCOUNT_TYPE,a.PHONE_ACCOUNT,a.PHONE_NUMBER,a.ATTRIBUTE4 from AISSE_EMPLOYEE_MOBILE_INFO_V a where PHONE_NUMBER is not null and NT_ACCOUNT = ? and ACCOUNT_TYPE not in ('统一充值','United Voucher'):preaparedStatement.executeQuery:select a.ACCOUNT_TYPE,a.PHONE_ACCOUNT,a.PHONE_NUMBER,a.ATTRIBUTE4 from AISSE_EMPLOYEE_MOBILE_INFO_V a where PHONE_NUMBER is not null and NT_ACCOUNT = ? and ACCOUNT_TYPE not in ('统一充值','United Voucher')");
list.add("tracing:jdbc:oracle:thin:@10.1.1.61:1521:OAPROD(aisse)preaparedStatement.executeQuery:select a.ACCOUNT_TYPE,a.PHONE_ACCOUNT,a.PHONE_NUMBER,a.ATTRIBUTE4 from AISSE_EMPLOYEE_MOBILE_INFO_V a where lower(a.NT_ACCOUNT) = ?:preaparedStatement.executeQuery:select a.ACCOUNT_TYPE,a.PHONE_ACCOUNT,a.PHONE_NUMBER,a.ATTRIBUTE4 from AISSE_EMPLOYEE_MOBILE_INFO_V a where lower(a.NT_ACCOUNT) = ?");
list.add("dubbo://aisse-mobile-web/com.ai.aisse.core.rest.ExpenseInitApi.searchMembersinfo(String):");
list.add("com.ai.aisse.core.dao.impl.QueryUserMessageDaoImpl.selectDemoList(java.lang.String):");
list.add("com.ai.aisse.controller.common.CommonController.toAisseMobilePage(com.ai.net.xss.wrapper.XssRequestWrapper,org.apache.catalina.connector.ResponseFacade,org.springframework.validation.support.BindingAwareModelMap):");
for (String string : list) {
System.out.println(beautifulViewPoint(string, "ACCOUNT_TYPE"));
}
}
}
function initAnalysisResult() {
function AnalysisResultViewResolver(param) {
AnalysisResultViewResolver.prototype.baseUrl = param.baseUrl;
AnalysisResultViewResolver.prototype.treeId = param.treeId;
this.bindEvent();
}
AnalysisResultViewResolver.prototype.bindEvent = function () {
var self = this;
$('#analyDate').datetimepicker({
format: 'yyyy-mm-dd',
startView: 2,
......@@ -8,76 +13,53 @@ function initAnalysisResult() {
autoclose: true
});
$("#previousHourBtn").click(function () {
var analyType = "HOUR";
var analyDate = getPreviousHour();
paintAnalysisResult($("#treeId").val(), analyType, analyDate)
});
this.bindHotSearchLink();
this.bindEventForSearchDateInput();
$("#yesterdayBtn").click(function () {
var analyType = "DAY";
var analyDate = getYesterday();
paintAnalysisResult($("#treeId").val(), analyType, analyDate)
});
$("a[name='analyTypeDropDownOption'][value='MONTH']").click();
$("#analyDate").val(this.getCurrentMonth());
$("#currentMonthBtn").click(function () {
var analyType = "MONTH";
var analyDate = getCurrentMonth();
paintAnalysisResult($("#treeId").val(), analyType, analyDate)
$("#showAnalyResultBtn").click(function () {
self.loadData($("#analyType").val(), $("#analyDate").val());
});
$("#showAnalyResultBtn").click();
$("#previousMonthBtn").click(function () {
var analyType = "MONTH";
var analyDate = getPreviousMonth();
paintAnalysisResult($("#treeId").val(), analyType, analyDate)
});
}
$("a[name='analyTypeDropDownOption']").each(function () {
$(this).click(function () {
$('#analyDate').val("");
$("#analyTypeDropDown").text($(this).text());
var value = $(this).attr("value");
var modelView = 2;
var formatStr = 'yyyy-mm-dd';
if (value == "HOUR") {
formatStr = 'yyyy-mm-dd:hh';
modelView = 1;
} else if (value == "DAY") {
formatStr = 'yyyy-mm-dd';
modelView = 2;
} else if (value == "MONTH") {
formatStr = 'yyyy-mm';
modelView = 3;
} else {
formatStr = 'yyyy-mm-dd';
modelView = 2;
}
$('#analyDate').datetimepicker('remove');
$('#analyDate').datetimepicker({
format: formatStr,
startView: modelView,
minView: modelView,
autoclose: true
});
$("#analyType").val(value);
});
});
AnalysisResultViewResolver.prototype.callChainTreeData = [];
AnalysisResultViewResolver.prototype.callEntrance = {};
AnalysisResultViewResolver.prototype.typicCallChainData = [];
AnalysisResultViewResolver.prototype.currentTypicalTreeNodeMapping = [];
$("a[name='analyTypeDropDownOption'][value='MONTH']").click();
$("#analyDate").val(getCurrentMonth());
AnalysisResultViewResolver.prototype.showTypicalCallTree = function (nodeToken) {
$("#showAnalyResultBtn").click(function () {
paintAnalysisResult($("#treeId").val(), $("#analyType").val(), $("#analyDate").val())
});
$("#showAnalyResultBtn").click();
for (var i = 0; i < this.typicCallChainData.length; i++) {
var node = this.typicCallChainData[i];
var tmpInfo = node.treeNodes[nodeToken];
if (tmpInfo == undefined || tmpInfo == "") {
continue;
}
var tmpTypicalCallChain = {};
tmpTypicalCallChain.callTreeId = node.callTreeId;
for (var key in node.treeNodes) {
var tmpNode = node.treeNodes[key];
tmpNode.analyResult = JSON.parse($("#" + key).text());
tmpTypicalCallChain.nodes.push(tmpNode);
}
this.currentTypicalTreeNodeMapping.push(tmpTypicalCallChain);
}
alert(currentTypicalTreeNodeMapping);
}
function paintAnalysisResult(treeId, analyType, analyDate) {
var baseUrl = $("#baseUrl").text();
var analysisResultUrl = baseUrl + "/analy/load/" + treeId + "/" +
AnalysisResultViewResolver.prototype.loadData = function (analyType, analyDate) {
var self = this;
var analysisResultUrl = this.baseUrl + "/analy/load/" + this.treeId + "/" +
analyType + "/" + analyDate;
$.ajax({
type: 'POST',
......@@ -86,11 +68,24 @@ function paintAnalysisResult(treeId, analyType, analyDate) {
async: true,
success: function (data) {
if (data.code == '200') {
var dataResult = convertAnalysisResult(jQuery.parseJSON(data.result));
self.callChainTreeData = self.convertAnalysisResult(jQuery.parseJSON(data.result));
var template = $.templates("#analysisResultTableTmpl");
var htmlOutput = template.render(dataResult);
var htmlOutput = template.render(self.callChainTreeData);
$("#dataBody").empty();
$("#dataBody").html(htmlOutput);
$("button[name='showTypicalCallTreeBtn']").each(function () {
$(this).click(function () {
var treeNode = $(this).attr("value");
$(".modal-backdrop").remove();
self.showTypicalCallTree(treeNode);
var template = $.templates("#typicalCallChainTreesTmpl");
var htmlOutput = template.render({});
$("#mainPanel").empty();
$("#mainPanel").html(htmlOutput);
})
});
}
},
error: function () {
......@@ -98,26 +93,26 @@ function paintAnalysisResult(treeId, analyType, analyDate) {
$("#alertMessageBox").show();
}
});
var typicalCallUrl = baseUrl + "/analy/load/" + treeId + "/" + analyDate;
var typicCallTreeUrl = this.baseUrl + "/analy/load/" + this.treeId + "/" + analyDate;
$.ajax({
type: 'POST',
url: typicalCallUrl,
url: typicCallTreeUrl,
dataType: 'json',
async: true,
success: function (data) {
if (data.code == '200') {
//data.result
self.typicCallChainData = jQuery.parseJSON(data.result);
}
},
error: function () {
$("#errorMessage").text("Fatal Error, please try it again.");
$("#alertMessageBox").show();
}
});
})
}
function convertAnalysisResult(originData) {
AnalysisResultViewResolver.prototype.convertAnalysisResult = function (originData) {
if (originData == undefined || originData.callChainTreeNodeList == undefined) {
return [];
}
......@@ -127,6 +122,9 @@ function convertAnalysisResult(originData) {
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) {
......@@ -136,11 +134,11 @@ function convertAnalysisResult(originData) {
flag = true;
}
if (flag){
if (flag) {
originData.callChainTreeNodeList[i].isPrintLevelId = false;
originData.callChainTreeNodeList[index].rowSpanCount = count;
flag = false;
}else{
} else {
count = 1;
originData.callChainTreeNodeList[i].rowSpanCount = count;
originData.callChainTreeNodeList[i].isPrintLevelId = true;
......@@ -158,13 +156,15 @@ function convertAnalysisResult(originData) {
node.anlyResult.correctRate = (0).toFixed(2);
node.anlyResult.averageCost = (0).toFixed(2);
}
node.anlyResultStr = JSON.stringify(node.anlyResult);
previousNodeLevelId = node.traceLevelId;
}
return originData.callChainTreeNodeList;
}
function getPreviousHour() {
AnalysisResultViewResolver.prototype.getPreviousHour = function () {
var date = new Date();
var seperator1 = "-";
var seperator2 = ":";
......@@ -179,7 +179,7 @@ function getPreviousHour() {
return date.getFullYear() + seperator1 + month + seperator1 + strDate + seperator2 + (date.getHours() - 1);
}
function getYesterday() {
AnalysisResultViewResolver.prototype.getYesterday = function () {
var date = new Date();
var seperator1 = "-";
var month = date.getMonth() + 1;
......@@ -193,7 +193,7 @@ function getYesterday() {
return date.getFullYear() + seperator1 + month + seperator1 + strDate;
}
function getCurrentMonth() {
AnalysisResultViewResolver.prototype.getCurrentMonth = function () {
var date = new Date();
var seperator1 = "-";
var month = date.getMonth() + 1;
......@@ -203,7 +203,7 @@ function getCurrentMonth() {
return date.getFullYear() + seperator1 + month;
}
function getPreviousMonth() {
AnalysisResultViewResolver.prototype.getPreviousMonth = function () {
var date = new Date();
var seperator1 = "-";
var month = date.getMonth();
......@@ -216,4 +216,58 @@ function getPreviousMonth() {
month = "0" + month;
}
return year + seperator1 + month;
}
AnalysisResultViewResolver.prototype.bindEventForSearchDateInput = function () {
$("a[name='analyTypeDropDownOption']").each(function () {
$(this).click(function () {
$('#analyDate').val("");
$("#analyTypeDropDown").text($(this).text());
var value = $(this).attr("value");
var modelView = 2;
var formatStr = 'yyyy-mm-dd';
if (value == "HOUR") {
formatStr = 'yyyy-mm-dd:hh';
modelView = 1;
} else if (value == "DAY") {
formatStr = 'yyyy-mm-dd';
modelView = 2;
} else if (value == "MONTH") {
formatStr = 'yyyy-mm';
modelView = 3;
} else {
formatStr = 'yyyy-mm-dd';
modelView = 2;
}
$('#analyDate').datetimepicker('remove');
$('#analyDate').datetimepicker({
format: formatStr,
startView: modelView,
minView: modelView,
autoclose: true
});
$("#analyType").val(value);
});
});
}
AnalysisResultViewResolver.prototype.bindHotSearchLink = function () {
var self = this;
$("#previousHourBtn").click(function () {
self.loadData("HOUR", self.getPreviousHour())
});
$("#yesterdayBtn").click(function () {
self.loadData("DAY", self.getYesterday())
});
$("#currentMonthBtn").click(function () {
self.loadData("MONTH", self.getCurrentMonth())
});
$("#previousMonthBtn").click(function () {
self.loadData("MONTH", self.getPreviousMonth())
});
}
\ No newline at end of file
......@@ -45,6 +45,7 @@
</tbody>
</table>
</div>
<hr/>
</script>
</#macro>
......@@ -54,7 +55,33 @@
{{if isPrintLevelId}}
<td rowspan="{{>rowSpanCount}}" valign="middle">{{>traceLevelId}}</td>
{{/if}}
<td><a href="#">{{>viewPoint}}<a></td>
<td>
<a href="javascript:void(0);" data-toggle="modal" data-target="#modal{{>nodeToken}}">{{>viewPoint}}</a>
<div class="modal fade" id="modal{{>nodeToken}}" tabindex="-1" role="dialog" aria-labelledby="modal{{>modalId}}Label">
<div class="modal-dialog" role="document">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">节点详情</h4>
</div>
<div class="modal-body">
<div class= "row">
<div class="col-md-10">
<label>viewpoint:</label><br/>
<span style="word-wrap:break-word;">{{>viewPointStr}}</span>
</div>
</div>
</div>
<div class="modal-footer">
<button name="showTypicalCallTreeBtn" type="button" class="btn btn-primary" value="{{>nodeToken}}">查看调用链</button>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
</div>
</td>
<td>{{>anlyResult.totalCall}}</td>
<td>{{>anlyResult.correctNumber}}</td>
<td>
......@@ -68,8 +95,111 @@
{{/if}}
">
<strong>{{>anlyResult.correctRate}}%</strong></span></td>
<td>{{>anlyResult.averageCost}}ms</td>
<td>{{>anlyResult.averageCost}}ms
<span id="{{>nodeToken}}" style="display:none">{{>anlyResultStr}}</span></td>
</tr>
</script>
</#macro>
<#macro typicalCallChainTrees>
<script type="text/x-jsrender" id="typicalCallChainTreesTmpl">
<br/>
<div class="row">
<small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a>http://aisse-mobile-web/Aisse-Mobile-Web/aisseWorkPage/backOvertimeInit</a> </small>
<br/>
<small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;com.ai.aisse.controller.overtimeexpense.Ov...t(HttpServletRequest,HttpServletResponse,ModelMap)</small>
</div>
<br/>
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;归属该节点下所有的典型调用链:</span>
<input type="checkbox"/>典型调用链1&nbsp;
<input type="checkbox">典型调用链2</input>&nbsp;
<input type="checkbox">典型调用链3</input>
</div>
<br/>
<table class="gridtable" style="width:100%;">
<thead>
<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>
</table>
</div>
</div>
</script>
</#macro>
\ No newline at end of file
</#macro>
......@@ -19,14 +19,16 @@
<script src="${_base}/bower_components/skywalking/js/tracelog.js"></script>
<script src="${_base}/bower_components/skywalking/js/application.js"></script>
<script src="${_base}/bower_components/skywalking/js/analysisSearchResult.js"></script>
<script src="${_base}/bower_components/skywalking/js/analysisResult.js"></script>
<#--<script src="${_base}/bower_components/skywalking/js/analysisResult.js"></script>-->
<script src="${_base}/bower_components/skywalking/js/analysisResultViewResovler.js"></script>
<script src="${_base}/bower_components/smalot-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<link href="${_base}/bower_components/smalot-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<link href="${_base}/bower_components/smalot-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css"
rel="stylesheet">
<link href="${_base}/bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" rel="stylesheet">
<script src="${_base}/bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script>
</head>
<body style="padding-top:100px">
<body style="padding-top:80px">
<@common.navbar/>
<!--Trace Info -->
<@traceInfo.traceTableTmpl/>
......@@ -43,6 +45,7 @@
<@anlySearchResult.pageInfoTmpl/>
<@anlyResult.analysisResult/>
<@anlyResult.analysisResultTableTmpl/>
<@anlyResult.typicalCallChainTrees/>
<p id="baseUrl" style="display: none">${_base}</p>
<div class="container" id="mainPanel">
<p id="searchType" style="display: none">${searchType!''}</p>
......@@ -59,14 +62,15 @@
var searchKey = $("#searchKey").val();
if (searchKey.match(/viewpoint:*/i)) {
loadContent("showAnlySearchResult")
} else if (searchKey.match(/analysisresult:*/i)){
} else if (searchKey.match(/analysisresult:*/i)) {
loadContent("showAnalysisResult");
} else{
} else {
loadContent("showTraceInfo");
}
})
});
var viewResolver;
function loadContent(loadType, param) {
if (loadType == "showTraceInfo") {
......@@ -99,7 +103,7 @@
var htmlOutput = template.render({treeId: searchKey});
$("#mainPanel").empty();
$("#mainPanel").html(htmlOutput);
initAnalysisResult()
viewResolver = new AnalysisResultViewResolver({baseUrl: "${_base}", treeId: searchKey})
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册