mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
fix: types
This commit is contained in:
parent
d507eaf2b8
commit
293ff37ab5
@ -119,7 +119,9 @@ export async function useExpressionsQueryProcessor(config: Indexable) {
|
|||||||
} else {
|
} else {
|
||||||
for (const item of results) {
|
for (const item of results) {
|
||||||
const values = item.values.map((d: { value: unknown }) => d.value) || [];
|
const values = item.values.map((d: { value: unknown }) => d.value) || [];
|
||||||
const label = item.metric.labels.map((d: any) => `${d.key}=${d.value}`).join(",");
|
const label = item.metric.labels
|
||||||
|
.map((d: { key: string; value: string }) => `${d.key}=${d.value}`)
|
||||||
|
.join(",");
|
||||||
|
|
||||||
source[label] = values;
|
source[label] = values;
|
||||||
}
|
}
|
||||||
@ -127,7 +129,9 @@ export async function useExpressionsQueryProcessor(config: Indexable) {
|
|||||||
}
|
}
|
||||||
if (type === ExpressionResultType.SINGLE_VALUE) {
|
if (type === ExpressionResultType.SINGLE_VALUE) {
|
||||||
for (const item of results) {
|
for (const item of results) {
|
||||||
const label = item.metric.labels.map((d: any) => `${d.key}=${d.value}`).join(",");
|
const label = item.metric.labels
|
||||||
|
.map((d: { key: string; value: string }) => `${d.key}=${d.value}`)
|
||||||
|
.join(",");
|
||||||
const values = item.values.map((d: { value: unknown }) => d.value) || [];
|
const values = item.values.map((d: { value: unknown }) => d.value) || [];
|
||||||
if (results.length === 1) {
|
if (results.length === 1) {
|
||||||
source[label || c.label || name] = values;
|
source[label || c.label || name] = values;
|
||||||
|
Loading…
Reference in New Issue
Block a user