mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 20:23:15 +00:00
avoid invalid querys (#74)
This commit is contained in:
parent
02f5c4b976
commit
f40e9633df
@ -45,7 +45,7 @@ import { Option } from "@/types/app";
|
|||||||
const emit = defineEmits(["change"]);
|
const emit = defineEmits(["change"]);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
options: {
|
options: {
|
||||||
type: Array as PropType<(Option & { disabled: boolean })[]>,
|
type: Array as PropType<Option[]>,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
|
@ -410,6 +410,9 @@ export const topologyStore = defineStore({
|
|||||||
const idsC = this.calls
|
const idsC = this.calls
|
||||||
.filter((i: Call) => i.detectPoints.includes("CLIENT"))
|
.filter((i: Call) => i.detectPoints.includes("CLIENT"))
|
||||||
.map((b: Call) => b.id);
|
.map((b: Call) => b.id);
|
||||||
|
if (!idsC.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const param = await useQueryTopologyMetrics(linkClientMetrics, idsC);
|
const param = await useQueryTopologyMetrics(linkClientMetrics, idsC);
|
||||||
const res = await this.getCallClientMetrics(param);
|
const res = await this.getCallClientMetrics(param);
|
||||||
|
|
||||||
@ -425,6 +428,9 @@ export const topologyStore = defineStore({
|
|||||||
const idsS = this.calls
|
const idsS = this.calls
|
||||||
.filter((i: Call) => i.detectPoints.includes("SERVER"))
|
.filter((i: Call) => i.detectPoints.includes("SERVER"))
|
||||||
.map((b: Call) => b.id);
|
.map((b: Call) => b.id);
|
||||||
|
if (!idsS.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const param = await useQueryTopologyMetrics(linkServerMetrics, idsS);
|
const param = await useQueryTopologyMetrics(linkServerMetrics, idsS);
|
||||||
const res = await this.getCallServerMetrics(param);
|
const res = await this.getCallServerMetrics(param);
|
||||||
|
|
||||||
@ -438,6 +444,9 @@ export const topologyStore = defineStore({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const ids = this.nodes.map((d: Node) => d.id);
|
const ids = this.nodes.map((d: Node) => d.id);
|
||||||
|
if (!ids.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const param = await useQueryTopologyMetrics(nodeMetrics, ids);
|
const param = await useQueryTopologyMetrics(nodeMetrics, ids);
|
||||||
const res = await this.getNodeMetricValue(param);
|
const res = await this.getNodeMetricValue(param);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user