diff --git a/src/views/dashboard/related/trace/components/D3Graph/Index.vue b/src/views/dashboard/related/trace/components/D3Graph/Index.vue index a4f4ffbe..8371abc3 100644 --- a/src/views/dashboard/related/trace/components/D3Graph/Index.vue +++ b/src/views/dashboard/related/trace/components/D3Graph/Index.vue @@ -162,6 +162,9 @@ limitations under the License. --> } } function viewParentSpan(span: Recordable) { + if (props.type === TraceGraphType.TABLE) { + return; + } tree.value.highlightParents(span); } function traverseTree(node: Recordable, spanId: string, segmentId: string, data: Recordable) { diff --git a/src/views/dashboard/related/trace/components/Table.vue b/src/views/dashboard/related/trace/components/Table.vue index bf4c893a..d2e63d81 100644 --- a/src/views/dashboard/related/trace/components/Table.vue +++ b/src/views/dashboard/related/trace/components/Table.vue @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> @@ -29,10 +29,11 @@ limitations under the License. --> }); diff --git a/src/views/dashboard/related/trace/components/Table/TableContainer.vue b/src/views/dashboard/related/trace/components/Table/TableContainer.vue index 4b917f5b..fb803c95 100644 --- a/src/views/dashboard/related/trace/components/Table/TableContainer.vue +++ b/src/views/dashboard/related/trace/components/Table/TableContainer.vue @@ -47,7 +47,7 @@ limitations under the License. --> :key="`key${index}`" :type="type" :headerType="headerType" - @click="selectItem()" + @click="selectItem" /> @@ -104,8 +104,24 @@ limitations under the License. --> }; }; }); - function selectItem() { + function selectItem(event: MouseEvent) { emits("select", traceStore.selectedSpan); + if (props.headerType === WidgetType.Profile) { + return; + } + if (props.type === TraceGraphType.STATISTICS) { + return; + } + const item: any = document.querySelector("#trace-action-box"); + const tableBox = document.querySelector(".trace-table-charts")?.getBoundingClientRect(); + if (!tableBox) { + return; + } + const offsetX = event.x - tableBox.x; + const offsetY = event.y - tableBox.y; + item.style.display = "block"; + item.style.top = `${offsetY + 20}px`; + item.style.left = `${offsetX + 10}px`; } function sortStatistics(key: string) { const element = props.tableData; diff --git a/src/views/dashboard/related/trace/components/Table/TableItem.vue b/src/views/dashboard/related/trace/components/Table/TableItem.vue index 265f3bc4..a8161bd4 100644 --- a/src/views/dashboard/related/trace/components/Table/TableItem.vue +++ b/src/views/dashboard/related/trace/components/Table/TableItem.vue @@ -17,14 +17,14 @@ limitations under the License. -->
- + {{ data.groupRef.endpointName }}
- + {{ data.groupRef.type }} @@ -75,7 +75,7 @@ limitations under the License. --> /> @@ -83,12 +83,12 @@ limitations under the License. --> - + - + {{ data.endpointName }} @@ -109,12 +109,12 @@ limitations under the License. --> {{ data.dur ? data.dur + "" : "0" }}
- + {{ data.component || "-" }}
- + {{ data.serviceCode }}
@@ -284,8 +284,6 @@ limitations under the License. --> } .trace-item.level0 { - color: #448dfe; - &:hover { background: rgb(0 0 0 / 4%); }