mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 00:08:56 +00:00
feat: exclude empty data
This commit is contained in:
parent
8bcc886017
commit
1414ded4f6
@ -71,7 +71,7 @@ export const RespFields: Indexable = {
|
||||
readMetricsValues: `{
|
||||
label
|
||||
values {
|
||||
values {value}
|
||||
values {value isEmptyValue}
|
||||
}
|
||||
}`,
|
||||
readMetricsValue: ``,
|
||||
@ -88,7 +88,7 @@ export const RespFields: Indexable = {
|
||||
readLabeledMetricsValues: `{
|
||||
label
|
||||
values {
|
||||
values {value}
|
||||
values {value isEmptyValue}
|
||||
}
|
||||
}`,
|
||||
readHeatMap: `{
|
||||
|
@ -361,7 +361,8 @@ export function useQueryTopologyMetrics(metrics: string[], ids: string[]) {
|
||||
|
||||
return { queryStr, conditions };
|
||||
}
|
||||
function calculateExp(arr: { value: number }[], config: { calculation?: string }): (number | string)[] {
|
||||
function calculateExp(list: { value: number }[], config: { calculation?: string }): (number | string)[] {
|
||||
const arr = list.filter((d: any) => !d.isEmptyValue);
|
||||
const sum = arr.map((d: { value: number }) => d.value).reduce((a, b) => a + b);
|
||||
let data: (number | string)[] = [];
|
||||
switch (config.calculation) {
|
||||
|
Loading…
Reference in New Issue
Block a user