mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 00:08:56 +00:00
fix: update
This commit is contained in:
parent
26a055ef22
commit
974e0917b0
@ -362,7 +362,13 @@ limitations under the License. -->
|
|||||||
|
|
||||||
async function initLegendMetrics() {
|
async function initLegendMetrics() {
|
||||||
const names = props.config.legend.map((d: any) => d.name);
|
const names = props.config.legend.map((d: any) => d.name);
|
||||||
|
if (!names.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (settings.value.metricMode === MetricModes.Expression) {
|
if (settings.value.metricMode === MetricModes.Expression) {
|
||||||
|
if (!topologyStore.nodes.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const { getNodeExpressionQuery } = useQueryTopologyExpressionsProcessor(names, topologyStore.nodes);
|
const { getNodeExpressionQuery } = useQueryTopologyExpressionsProcessor(names, topologyStore.nodes);
|
||||||
const param = getNodeExpressionQuery();
|
const param = getNodeExpressionQuery();
|
||||||
const res = await topologyStore.getNodeExpressionValue(param);
|
const res = await topologyStore.getNodeExpressionValue(param);
|
||||||
@ -373,7 +379,7 @@ limitations under the License. -->
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const ids = topologyStore.nodes.map((d: Node) => d.id);
|
const ids = topologyStore.nodes.map((d: Node) => d.id);
|
||||||
if (names.length && ids.length) {
|
if (ids.length) {
|
||||||
const param = await useQueryTopologyMetrics(names, ids);
|
const param = await useQueryTopologyMetrics(names, ids);
|
||||||
const res = await topologyStore.getLegendMetrics(param);
|
const res = await topologyStore.getLegendMetrics(param);
|
||||||
if (res.errors) {
|
if (res.errors) {
|
||||||
|
Loading…
Reference in New Issue
Block a user