Browse Source

fix(issue-platform): add subtitle for profiling issue details (#46270)

Gilbert Szeto 2 years ago
parent
commit
f60ff6c3a8
2 changed files with 10 additions and 0 deletions
  1. 1 0
      static/app/types/event.tsx
  2. 9 0
      static/app/utils/events.tsx

+ 1 - 0
static/app/types/event.tsx

@@ -243,6 +243,7 @@ export enum EventOrGroupType {
   EXPECTSTAPLE = 'expectstaple',
   DEFAULT = 'default',
   TRANSACTION = 'transaction',
+  GENERIC = 'generic',
 }
 
 /**

+ 9 - 0
static/app/utils/events.tsx

@@ -45,6 +45,8 @@ export function getMessage(
     case EventOrGroupType.EXPECTSTAPLE:
     case EventOrGroupType.HPKP:
       return '';
+    case EventOrGroupType.GENERIC:
+      return metadata.value;
     default:
       return culprit || '';
   }
@@ -180,6 +182,13 @@ export function getTitle(
         subtitle: isPerfIssue ? culprit : '',
         treeLabel: undefined,
       };
+    case EventOrGroupType.GENERIC:
+      const isProfilingIssue = event.issueCategory === IssueCategory.PROFILE;
+      return {
+        title: isProfilingIssue ? metadata.title : customTitle ?? title,
+        subtitle: isProfilingIssue ? culprit : '',
+        treeLabel: undefined,
+      };
     default:
       return {
         title: customTitle ?? title,