mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-03 07:45:24 +00:00
fix
This commit is contained in:
parent
75534fbc29
commit
5adec6dc4a
@ -113,4 +113,4 @@ export const LightChartColors = [
|
|||||||
"#c4ccd3",
|
"#c4ccd3",
|
||||||
];
|
];
|
||||||
|
|
||||||
export const MaxQueryLength = 300;
|
export const MaxQueryLength = 120;
|
||||||
|
@ -464,19 +464,19 @@ export function useQueryTopologyExpressionsProcessor(metrics: string[], instance
|
|||||||
|
|
||||||
return { queryStr, conditions };
|
return { queryStr, conditions };
|
||||||
}
|
}
|
||||||
function handleExpressionValues(resp: { [key: string]: any }) {
|
function handleExpressionValues(partMetrics: string[], resp: { [key: string]: any }) {
|
||||||
const obj: any = {};
|
const obj: any = {};
|
||||||
for (let idx = 0; idx < instances.length; idx++) {
|
for (let idx = 0; idx < instances.length; idx++) {
|
||||||
for (let index = 0; index < metrics.length; index++) {
|
for (let index = 0; index < partMetrics.length; index++) {
|
||||||
const k = "expression" + idx + index;
|
const k = "expression" + idx + index;
|
||||||
if (metrics[index]) {
|
if (partMetrics[index]) {
|
||||||
if (!obj[metrics[index]]) {
|
if (!obj[partMetrics[index]]) {
|
||||||
obj[metrics[index]] = {
|
obj[partMetrics[index]] = {
|
||||||
values: [],
|
values: [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
obj[metrics[index]].values.push({
|
obj[partMetrics[index]].values.push({
|
||||||
value: resp[k].results[0] && resp[k].results[0].values[0].value,
|
value: resp[k] && resp[k].results[0] && resp[k].results[0].values[0].value,
|
||||||
id: instances[idx].id,
|
id: instances[idx].id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -492,7 +492,7 @@ export function useQueryTopologyExpressionsProcessor(metrics: string[], instance
|
|||||||
ElMessage.error(res.errors);
|
ElMessage.error(res.errors);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return handleExpressionValues(res.data);
|
return handleExpressionValues(partMetrics, res.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getMetrics() {
|
async function getMetrics() {
|
||||||
|
Loading…
Reference in New Issue
Block a user