mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
fix: query param
This commit is contained in:
parent
0cc7329e5b
commit
62b3692ee3
@ -332,10 +332,14 @@ export function useQueryTopologyExpressionsProcessor(metrics: string[], instance
|
|||||||
let serviceInstanceName;
|
let serviceInstanceName;
|
||||||
let destServiceInstanceName;
|
let destServiceInstanceName;
|
||||||
let destEndpointName;
|
let destEndpointName;
|
||||||
|
let normal = false;
|
||||||
|
let destNormal;
|
||||||
if (d.sourceObj && d.targetObj) {
|
if (d.sourceObj && d.targetObj) {
|
||||||
// instances = Calls
|
// instances = Calls
|
||||||
serviceName = d.sourceObj.serviceName || d.sourceObj.name;
|
serviceName = d.sourceObj.serviceName || d.sourceObj.name;
|
||||||
destServiceName = d.targetObj.serviceName || d.targetObj.name;
|
destServiceName = d.targetObj.serviceName || d.targetObj.name;
|
||||||
|
normal = d.sourceObj.normal || d.sourceObj.isReal || false;
|
||||||
|
destNormal = d.targetObj.normal || d.targetObj.isReal || false;
|
||||||
if (EntityType[4].value === dashboardStore.entity) {
|
if (EntityType[4].value === dashboardStore.entity) {
|
||||||
serviceInstanceName = d.sourceObj.name;
|
serviceInstanceName = d.sourceObj.name;
|
||||||
destServiceInstanceName = d.targetObj.name;
|
destServiceInstanceName = d.targetObj.name;
|
||||||
@ -347,6 +351,10 @@ export function useQueryTopologyExpressionsProcessor(metrics: string[], instance
|
|||||||
} else {
|
} else {
|
||||||
// instances = Nodes
|
// instances = Nodes
|
||||||
serviceName = d.serviceName || d.name;
|
serviceName = d.serviceName || d.name;
|
||||||
|
normal = d.normal || d.isReal || false;
|
||||||
|
if (EntityType[3].value === dashboardStore.entity) {
|
||||||
|
serviceInstanceName = d.name;
|
||||||
|
}
|
||||||
if (EntityType[4].value === dashboardStore.entity) {
|
if (EntityType[4].value === dashboardStore.entity) {
|
||||||
serviceInstanceName = d.name;
|
serviceInstanceName = d.name;
|
||||||
}
|
}
|
||||||
@ -356,11 +364,11 @@ export function useQueryTopologyExpressionsProcessor(metrics: string[], instance
|
|||||||
}
|
}
|
||||||
const entity = {
|
const entity = {
|
||||||
serviceName,
|
serviceName,
|
||||||
normal: true,
|
normal,
|
||||||
serviceInstanceName,
|
serviceInstanceName,
|
||||||
endpointName,
|
endpointName,
|
||||||
destServiceName,
|
destServiceName,
|
||||||
destNormal: destServiceName ? true : undefined,
|
destNormal: destServiceName ? destNormal : undefined,
|
||||||
destServiceInstanceName,
|
destServiceInstanceName,
|
||||||
destEndpointName,
|
destEndpointName,
|
||||||
};
|
};
|
||||||
|
@ -611,13 +611,10 @@ export const topologyStore = defineStore({
|
|||||||
async queryHierarchyNodeExpressions(expressions: string[], layer: string) {
|
async queryHierarchyNodeExpressions(expressions: string[], layer: string) {
|
||||||
const nodes = this.hierarchyServiceNodes.filter((n: Node) => n.layer === layer);
|
const nodes = this.hierarchyServiceNodes.filter((n: Node) => n.layer === layer);
|
||||||
if (!nodes.length) {
|
if (!nodes.length) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!expressions.length) {
|
|
||||||
this.setHierarchyNodeMetricValue({}, layer);
|
this.setHierarchyNodeMetricValue({}, layer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.hierarchyServiceNodes.length) {
|
if (!expressions.length) {
|
||||||
this.setHierarchyNodeMetricValue({}, layer);
|
this.setHierarchyNodeMetricValue({}, layer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -626,17 +623,16 @@ export const topologyStore = defineStore({
|
|||||||
},
|
},
|
||||||
async queryHierarchyInstanceNodeExpressions(expressions: string[], layer: string) {
|
async queryHierarchyInstanceNodeExpressions(expressions: string[], layer: string) {
|
||||||
const nodes = this.hierarchyInstanceNodes.filter((n: Node) => n.layer === layer);
|
const nodes = this.hierarchyInstanceNodes.filter((n: Node) => n.layer === layer);
|
||||||
if (!nodes.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!expressions.length) {
|
if (!expressions.length) {
|
||||||
this.setHierarchyInstanceNodeMetricValue({}, layer);
|
this.setHierarchyInstanceNodeMetricValue({}, layer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.hierarchyServiceNodes.length) {
|
if (!nodes.length) {
|
||||||
this.setHierarchyInstanceNodeMetricValue({}, layer);
|
this.setHierarchyInstanceNodeMetricValue({}, layer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log(nodes);
|
||||||
const metrics = await this.queryHierarchyExpressions(expressions, nodes);
|
const metrics = await this.queryHierarchyExpressions(expressions, nodes);
|
||||||
this.setHierarchyInstanceNodeMetricValue(metrics, layer);
|
this.setHierarchyInstanceNodeMetricValue(metrics, layer);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user