From 07e8457efd6d017e40351c038e62fbac465bd0b7 Mon Sep 17 00:00:00 2001 From: baurine <2008.hbl@gmail.com> Date: Mon, 20 Dec 2021 12:45:21 +0800 Subject: [PATCH] refine --- ui/lib/apps/ContinuousProfiling/pages/Detail.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/lib/apps/ContinuousProfiling/pages/Detail.tsx b/ui/lib/apps/ContinuousProfiling/pages/Detail.tsx index 59f2187a14..341582de8a 100644 --- a/ui/lib/apps/ContinuousProfiling/pages/Detail.tsx +++ b/ui/lib/apps/ContinuousProfiling/pages/Detail.tsx @@ -43,6 +43,12 @@ export default function Page() { let startIndex = 0 const profiles = groupProfileDetail?.target_profiles || [] + // rename profile to cpu for profile_type + profiles.forEach((p) => { + if (p.profile_type === 'profile') { + p.profile_type = 'cpu' + } + }) profiles.sort((a, b) => { if (a.target!.component! > b.target!.component!) { return 1 @@ -87,7 +93,7 @@ export default function Page() { maxWidth: 300, onRender: (record) => { const profileType = record.profile_type - if (profileType === 'profile') { + if (profileType === 'cpu') { return `CPU Profiling - ${profileDuration}s` } return upperFirst(profileType)