|
@@ -1507,6 +1507,11 @@ export default {
|
|
|
// 自定义 tooltip 内容
|
|
|
getContent: (e) => {
|
|
|
|
|
|
+ // <div style='padding:10px;text-align:center'>
|
|
|
+ // <img style='width:24px;height:24px;' src=${item.span_category =='apm'?this.apm:this.apis}/>
|
|
|
+ // <div style='width:100%;height:100%;background:inherit;filter: blur(5px);'></div>
|
|
|
+ // </div>
|
|
|
+
|
|
|
const outDiv = document.createElement('div');
|
|
|
const nodeName = e.item.getModel().name;
|
|
|
const item = e.item.getModel()
|
|
@@ -1520,29 +1525,30 @@ export default {
|
|
|
<span class='value' style='display: inline-block;vertical-align: middle;'>${detail[key]}</span>
|
|
|
</div>`;
|
|
|
}
|
|
|
- outDiv.innerHTML = `<div>
|
|
|
- <div style='padding:10px;text-align:center'><img style='width:24px;height:24px;' src=${item.span_category =='apm'?this.apm:this.apis}/></div>
|
|
|
- <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
- <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>SpanID:</span>
|
|
|
- <span class='value' style='display: inline-block;vertical-align: middle;'>${item.span_id}</span>
|
|
|
- </div>
|
|
|
- <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
- <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>SpanName:</span>
|
|
|
- <span class='value' style='display: inline-block;vertical-align: middle;'>${item.span_name}</span>
|
|
|
- </div>
|
|
|
- <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
- <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>SpanCategory:</span>
|
|
|
- <span class='value' style='display: inline-block;vertical-align: middle;'>${item.span_category}</span>
|
|
|
- </div>
|
|
|
- <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
- <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>Duration:</span>
|
|
|
- <span class='value' style='display: inline-block;vertical-align: middle;'>${item.duration}</span>
|
|
|
- </div>
|
|
|
- <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
- <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>FlatDuration:</span>
|
|
|
- <span class='value' style='display: inline-block;vertical-align: middle;'>${item.flat_duration}</span>
|
|
|
- </div>
|
|
|
- ${html}
|
|
|
+ outDiv.innerHTML = `<div style='margin:-9px;position:relative'>
|
|
|
+ <div style='padding:10px; z-index: -1;backdrop-filter: blur(10px);background-color: rgba(0, 0, 0, 0.8);background-image:url("${item.span_category =='apm'?this.apm:this.apis}");background-size:cover;background-repeat:no-repeat;background-position: center center;'>
|
|
|
+ <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
+ <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>SpanID:</span>
|
|
|
+ <span class='value' style='display: inline-block;vertical-align: middle;'>${item.span_id}</span>
|
|
|
+ </div>
|
|
|
+ <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
+ <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>SpanName:</span>
|
|
|
+ <span class='value' style='display: inline-block;vertical-align: middle;'>${item.span_name}</span>
|
|
|
+ </div>
|
|
|
+ <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
+ <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>SpanCategory:</span>
|
|
|
+ <span class='value' style='display: inline-block;vertical-align: middle;'>${item.span_category}</span>
|
|
|
+ </div>
|
|
|
+ <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
+ <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>Duration:</span>
|
|
|
+ <span class='value' style='display: inline-block;vertical-align: middle;'>${item.duration}</span>
|
|
|
+ </div>
|
|
|
+ <div class='nodeDetail' style='height:20px;line-height:20px;'>
|
|
|
+ <span class='label' style='display: inline-block;vertical-align: middle;width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: right;'>FlatDuration:</span>
|
|
|
+ <span class='value' style='display: inline-block;vertical-align: middle;'>${item.flat_duration}</span>
|
|
|
+ </div>
|
|
|
+ ${html}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
`
|
|
|
return outDiv;
|
|
@@ -1596,9 +1602,9 @@ export default {
|
|
|
// graph.render()
|
|
|
// // graph.fitCenter() // 移到图中心
|
|
|
// }, 10)
|
|
|
- setTimeout(() => {
|
|
|
- graph.fitCenter() // 移到图中心
|
|
|
- }, 10)
|
|
|
+ // setTimeout(() => {
|
|
|
+ // graph.fitCenter() // 移到图中心
|
|
|
+ // }, 10)
|
|
|
//添加点击事件
|
|
|
graph.on("node:click", (evt) => {
|
|
|
const itemData = evt.item._cfg.model;
|