feat: remove unexpected data for exporting dashboards (#89)

This commit is contained in:
Fine0830
2022-05-16 21:38:39 +08:00
committed by GitHub
parent 7f474984c4
commit 8c7fee4d86
3 changed files with 72 additions and 6 deletions

View File

@@ -331,7 +331,7 @@ export function useQueryTopologyMetrics(metrics: string[], ids: string[]) {
}
function calculateExp(
arr: { value: number }[],
config: { calculation: string }
config: { calculation?: string }
): (number | string)[] {
const sum = arr
.map((d: { value: number }) => d.value)
@@ -356,7 +356,7 @@ function calculateExp(
export function aggregation(
val: number,
config: { calculation: string }
config: { calculation?: string }
): number | string {
let data: number | string = Number(val);