diff --git a/src/components/SelectSingle.vue b/src/components/SelectSingle.vue index 0c101d56..ae8d3037 100644 --- a/src/components/SelectSingle.vue +++ b/src/components/SelectSingle.vue @@ -45,7 +45,7 @@ import { Option } from "@/types/app"; const emit = defineEmits(["change"]); const props = defineProps({ options: { - type: Array as PropType<(Option & { disabled: boolean })[]>, + type: Array as PropType, default: () => [], }, value: { diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 7a5a3503..9bed54dc 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -242,6 +242,10 @@ const msg = { defaultDepth: "Default Depth", traceTagsTip: `Only tags defined in the core/default/searchableTracesTags are searchable. Check more details on the Configuration Vocabulary page`, + logTagsTip: `Only tags defined in the core/default/searchableLogsTags are searchable. + Check more details on the Configuration Vocabulary page`, + alarmTagsTip: `Only tags defined in the core/default/searchableAlarmTags are searchable. + Check more details on the Configuration Vocabulary page`, tagsLink: "Configuration Vocabulary page", addTag: "Please input a tag", log: "Log", diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index d14876be..3e222342 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -243,6 +243,10 @@ const msg = { defaultDepth: "默认深度", traceTagsTip: "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。", + logTagsTip: + "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。", + alarmTagsTip: + "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。", tagsLink: "配置词汇页", addTag: "请添加标签", logCategory: "日志类别", diff --git a/src/store/modules/profile.ts b/src/store/modules/profile.ts index 9209e395..6dc8301a 100644 --- a/src/store/modules/profile.ts +++ b/src/store/modules/profile.ts @@ -161,7 +161,13 @@ export const profileStore = defineStore({ this.analyzeTrees = []; return res.data; } - this.segmentSpans = segment.spans; + this.segmentSpans = segment.spans.map((d: SegmentSpan) => { + return { + ...d, + segmentId: this.currentSegment.segmentId, + traceId: this.currentSegment.traceIds[0], + }; + }); if (!(segment.spans && segment.spans.length)) { this.analyzeTrees = []; return res.data; diff --git a/src/store/modules/topology.ts b/src/store/modules/topology.ts index c381e4bd..c72a452d 100644 --- a/src/store/modules/topology.ts +++ b/src/store/modules/topology.ts @@ -410,6 +410,9 @@ export const topologyStore = defineStore({ const idsC = this.calls .filter((i: Call) => i.detectPoints.includes("CLIENT")) .map((b: Call) => b.id); + if (!idsC.length) { + return; + } const param = await useQueryTopologyMetrics(linkClientMetrics, idsC); const res = await this.getCallClientMetrics(param); @@ -425,6 +428,9 @@ export const topologyStore = defineStore({ const idsS = this.calls .filter((i: Call) => i.detectPoints.includes("SERVER")) .map((b: Call) => b.id); + if (!idsS.length) { + return; + } const param = await useQueryTopologyMetrics(linkServerMetrics, idsS); const res = await this.getCallServerMetrics(param); @@ -438,6 +444,9 @@ export const topologyStore = defineStore({ return; } const ids = this.nodes.map((d: Node) => d.id); + if (!ids.length) { + return; + } const param = await useQueryTopologyMetrics(nodeMetrics, ids); const res = await this.getNodeMetricValue(param); diff --git a/src/views/components/ConditionTags.vue b/src/views/components/ConditionTags.vue index d4b1421c..19b58548 100644 --- a/src/views/components/ConditionTags.vue +++ b/src/views/components/ConditionTags.vue @@ -39,7 +39,17 @@ limitations under the License. --> > {{ t("tagsLink") }} - + diff --git a/src/views/dashboard/related/components/LogTable/LogService.vue b/src/views/dashboard/related/components/LogTable/LogService.vue index c91b1efe..4b40ff80 100644 --- a/src/views/dashboard/related/components/LogTable/LogService.vue +++ b/src/views/dashboard/related/components/LogTable/LogService.vue @@ -22,12 +22,12 @@ limitations under the License. --> {{ tags }} - {{ data[item.label] }} - + --> {{ data[item.label] }} diff --git a/src/views/dashboard/related/profile/components/TaskList.vue b/src/views/dashboard/related/profile/components/TaskList.vue index efcbb03f..ce18c162 100644 --- a/src/views/dashboard/related/profile/components/TaskList.vue +++ b/src/views/dashboard/related/profile/components/TaskList.vue @@ -124,12 +124,14 @@ limitations under the License. --> import { ref } from "vue"; import dayjs from "dayjs"; import { useI18n } from "vue-i18n"; +import { useSelectorStore } from "@/store/modules/selectors"; import { useProfileStore } from "@/store/modules/profile"; import { TaskLog, TaskListItem } from "@/types/profile"; import { ElMessage } from "element-plus"; const { t } = useI18n(); const profileStore = useProfileStore(); +const selectorStore = useSelectorStore(); const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") => dayjs(date).format(pattern); const viewDetail = ref(false); @@ -150,7 +152,7 @@ async function viewTask(e: Event, item: TaskListItem) { viewDetail.value = true; selectedTask.value = item; service.value = ( - profileStore.services.filter((s: any) => s.id === item.serviceId)[0] || {} + selectorStore.services.filter((s: any) => s.id === item.serviceId)[0] || {} ).label; const res = await profileStore.getTaskLogs({ taskID: item.id }); diff --git a/src/views/dashboard/related/trace/components/D3Graph/SpanDetail.vue b/src/views/dashboard/related/trace/components/D3Graph/SpanDetail.vue index e6390ff7..a34db4e9 100644 --- a/src/views/dashboard/related/trace/components/D3Graph/SpanDetail.vue +++ b/src/views/dashboard/related/trace/components/D3Graph/SpanDetail.vue @@ -40,7 +40,7 @@ limitations under the License. --> {{ currentSpan.peer || "No Peer" }}
- {{ t("error") }}: + {{ t("isError") }}: {{ currentSpan.isError }}
diff --git a/src/views/dashboard/related/trace/components/Table/TableItem.vue b/src/views/dashboard/related/trace/components/Table/TableItem.vue index 7f032fda..4becc9a1 100644 --- a/src/views/dashboard/related/trace/components/Table/TableItem.vue +++ b/src/views/dashboard/related/trace/components/Table/TableItem.vue @@ -105,8 +105,12 @@ limitations under the License. --> {{ data.serviceCode }}
-
- {{ t("view") }} +
+ {{ t("view") }}
+ d.className.includes("trace-item") + ); + emit("select", props.data); + viewSpanDetail(dom); + } - function selectedItem(data: any) { + function selectedItem(data: HTMLSpanElement) { emit("select", data); } - function viewSpanDetail(dom: any) { + function viewSpanDetail(dom: HTMLSpanElement) { showSelectSpan(dom); showDetail.value = true; } @@ -226,6 +237,7 @@ export default defineComponent({ showDetail, selectSpan, selectedItem, + viewSpan, t, }; },