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