You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/04/27 13:38:36 UTC
[skywalking-booster-ui] branch main updated: avoid invalid querys (#74)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-booster-ui.git
The following commit(s) were added to refs/heads/main by this push:
new f40e963 avoid invalid querys (#74)
f40e963 is described below
commit f40e9633df22e2b33cebd46228e961e687fe01fe
Author: Fine0830 <fi...@outlook.com>
AuthorDate: Wed Apr 27 21:38:31 2022 +0800
avoid invalid querys (#74)
---
src/components/SelectSingle.vue | 2 +-
src/store/modules/topology.ts | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/components/SelectSingle.vue b/src/components/SelectSingle.vue
index 0c101d5..ae8d303 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<Option[]>,
default: () => [],
},
value: {
diff --git a/src/store/modules/topology.ts b/src/store/modules/topology.ts
index c381e4b..c72a452 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);