mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
refactor: update
This commit is contained in:
parent
7101cc93ad
commit
b52e5a6988
@ -112,20 +112,7 @@ export async function useExpressionsQueryProcessor(config: Indexable) {
|
|||||||
tips.push(obj.error);
|
tips.push(obj.error);
|
||||||
typesOfMQE.push(type);
|
typesOfMQE.push(type);
|
||||||
if (!obj.error) {
|
if (!obj.error) {
|
||||||
if (type === ExpressionResultType.TIME_SERIES_VALUES) {
|
if ([ExpressionResultType.SINGLE_VALUE, ExpressionResultType.TIME_SERIES_VALUES].includes(type)) {
|
||||||
for (const item of results) {
|
|
||||||
const values = item.values.map((d: { value: unknown }) => d.value) || [];
|
|
||||||
const label = item.metric.labels
|
|
||||||
.map((d: { key: string; value: string }) => `${d.key}=${d.value}`)
|
|
||||||
.join(",");
|
|
||||||
if (results.length === 1) {
|
|
||||||
source[label || c.label || name] = values;
|
|
||||||
} else {
|
|
||||||
source[label] = values;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (type === ExpressionResultType.SINGLE_VALUE) {
|
|
||||||
for (const item of results) {
|
for (const item of results) {
|
||||||
const label =
|
const label =
|
||||||
item.metric &&
|
item.metric &&
|
||||||
|
Loading…
Reference in New Issue
Block a user