From eab42fa1c66242f3385d503bb83bdee4bc4128da Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Tue, 1 Mar 2022 22:19:01 +0800 Subject: [PATCH] fix: update profile --- src/store/modules/profile.ts | 5 + src/views/dashboard/panel/Layout.vue | 2 +- .../dashboard/related/profile/Content.vue | 4 +- .../related/profile/components/SpanTree.vue | 9 +- .../profile/components/Stack/Container.vue | 128 +++++++++++++++ .../profile/components/Stack/Index.vue | 109 +++++++++++++ .../related/profile/components/Stack/Item.vue | 153 ++++++++++++++++++ .../profile/components/Stack/profile.scss | 28 ++++ .../profile/components/ThreadStack.vue | 30 +++- src/views/dashboard/related/trace/Detail.vue | 22 ++- .../related/trace/components/List.vue | 2 +- .../related/trace/components/Table/Index.vue | 3 +- .../trace/components/Table/TableContainer.vue | 6 +- .../trace/components/Table/TableItem.vue | 21 ++- .../related/trace/components/Tree.vue | 2 +- 15 files changed, 493 insertions(+), 31 deletions(-) create mode 100644 src/views/dashboard/related/profile/components/Stack/Container.vue create mode 100644 src/views/dashboard/related/profile/components/Stack/Index.vue create mode 100644 src/views/dashboard/related/profile/components/Stack/Item.vue create mode 100644 src/views/dashboard/related/profile/components/Stack/profile.scss diff --git a/src/store/modules/profile.ts b/src/store/modules/profile.ts index b9b20a73..23ba57f8 100644 --- a/src/store/modules/profile.ts +++ b/src/store/modules/profile.ts @@ -40,6 +40,7 @@ interface ProfileState { currentSpan: SegmentSpan | Record; analyzeTrees: ProfileAnalyzationTrees; taskLogs: TaskLog[]; + highlightTop: boolean; } export const traceStore = defineStore({ @@ -55,6 +56,7 @@ export const traceStore = defineStore({ currentSpan: {}, analyzeTrees: [], taskLogs: [], + highlightTop: true, }), actions: { setConditions(data: { serviceId?: string; endpointName?: string }) { @@ -69,6 +71,9 @@ export const traceStore = defineStore({ setCurrentSegment(s: Trace) { this.currentSegment = s; }, + setHighlightTop() { + this.highlightTop = !this.highlightTop; + }, async getServices(layer: string) { const res: AxiosResponse = await graphql.query("queryServices").params({ layer, diff --git a/src/views/dashboard/panel/Layout.vue b/src/views/dashboard/panel/Layout.vue index a437f6ee..72c95881 100644 --- a/src/views/dashboard/panel/Layout.vue +++ b/src/views/dashboard/panel/Layout.vue @@ -31,7 +31,7 @@ limitations under the License. --> :key="item.i" @click="clickGrid(item)" :class="{ active: dashboardStore.activedGridItem === item.i }" - drag-ignore-from="svg.d3-trace-tree" + drag-ignore-from="svg.d3-trace-tree, .dragger" > diff --git a/src/views/dashboard/related/profile/Content.vue b/src/views/dashboard/related/profile/Content.vue index e756b15d..6de5fa37 100644 --- a/src/views/dashboard/related/profile/Content.vue +++ b/src/views/dashboard/related/profile/Content.vue @@ -32,13 +32,13 @@ import ThreadStack from "./components/ThreadStack.vue"; diff --git a/src/views/dashboard/related/profile/components/Stack/Index.vue b/src/views/dashboard/related/profile/components/Stack/Index.vue new file mode 100644 index 00000000..a22e4496 --- /dev/null +++ b/src/views/dashboard/related/profile/components/Stack/Index.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/views/dashboard/related/profile/components/Stack/Item.vue b/src/views/dashboard/related/profile/components/Stack/Item.vue new file mode 100644 index 00000000..731beab0 --- /dev/null +++ b/src/views/dashboard/related/profile/components/Stack/Item.vue @@ -0,0 +1,153 @@ + + + + diff --git a/src/views/dashboard/related/profile/components/Stack/profile.scss b/src/views/dashboard/related/profile/components/Stack/profile.scss new file mode 100644 index 00000000..fbfdbb99 --- /dev/null +++ b/src/views/dashboard/related/profile/components/Stack/profile.scss @@ -0,0 +1,28 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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. + */ +.dump-count { + width: 100px; +} + +.exec-ms { + width: 200px; + position: relative; +} + +.self { + width: 100px; +} diff --git a/src/views/dashboard/related/profile/components/ThreadStack.vue b/src/views/dashboard/related/profile/components/ThreadStack.vue index e1d9e68e..fe99b458 100644 --- a/src/views/dashboard/related/profile/components/ThreadStack.vue +++ b/src/views/dashboard/related/profile/components/ThreadStack.vue @@ -12,7 +12,33 @@ distributed under the License is distributed on an "AS IS" BASIS, 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. --> + - + + diff --git a/src/views/dashboard/related/trace/Detail.vue b/src/views/dashboard/related/trace/Detail.vue index ae44f0e1..ade0f74e 100644 --- a/src/views/dashboard/related/trace/Detail.vue +++ b/src/views/dashboard/related/trace/Detail.vue @@ -123,14 +123,16 @@ limitations under the License. -->
{{ t("noData") }}
- +
+ +