You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/11/24 10:51:27 UTC

[skywalking-booster-ui] branch main updated: fix: update metric processor for the `readRecords` and remove `readSampledRecords` from metrics selector (#191)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-booster-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new 7a1c83b  fix: update metric processor for the `readRecords` and remove `readSampledRecords` from metrics selector  (#191)
7a1c83b is described below

commit 7a1c83b5fb4558b412404441725c99dc25b8b5ba
Author: Fine0830 <fa...@gmail.com>
AuthorDate: Thu Nov 24 18:51:21 2022 +0800

    fix: update metric processor for the `readRecords` and remove `readSampledRecords` from metrics selector  (#191)
---
 src/hooks/useMetricsProcessor.ts | 9 +++++++--
 src/views/dashboard/data.ts      | 5 +----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/hooks/useMetricsProcessor.ts b/src/hooks/useMetricsProcessor.ts
index 54dc3a1..979d950 100644
--- a/src/hooks/useMetricsProcessor.ts
+++ b/src/hooks/useMetricsProcessor.ts
@@ -213,8 +213,13 @@ export function useSourceProcessor(
       source[m] = aggregation(Number(Object.values(resp.data)[0]), c);
     }
     if (
-      type === MetricQueryTypes.SortMetrics ||
-      type === MetricQueryTypes.ReadSampledRecords
+      (
+        [
+          MetricQueryTypes.ReadRecords,
+          MetricQueryTypes.ReadSampledRecords,
+          MetricQueryTypes.SortMetrics,
+        ] as string[]
+      ).includes(type)
     ) {
       source[m] = (Object.values(resp.data)[0] || []).map(
         (d: { value: unknown; name: string }) => {
diff --git a/src/views/dashboard/data.ts b/src/views/dashboard/data.ts
index 534aeea..c1edb5a 100644
--- a/src/views/dashboard/data.ts
+++ b/src/views/dashboard/data.ts
@@ -134,10 +134,7 @@ export const MetricTypes: {
   HEATMAP: [
     { label: "read heatmap values in the duration", value: "readHeatMap" },
   ],
-  SAMPLED_RECORD: [
-    { label: "get sorted topN values", value: "readRecords" },
-    { label: "get sorted topN values", value: "readSampledRecords" },
-  ],
+  SAMPLED_RECORD: [{ label: "get sorted topN values", value: "readRecords" }],
 };
 
 export enum MetricCatalog {