yangjunhan commented on code in PR #21432:
URL: https://github.com/apache/flink/pull/21432#discussion_r1044001784


##########
flink-runtime-web/web-dashboard/src/app/pages/job/overview/flamegraph/job-overview-drawer-flamegraph.component.ts:
##########
@@ -55,7 +55,7 @@ export class JobOverviewDrawerFlameGraphComponent implements 
OnInit, OnDestroy {
   public selectedVertex: NodesItemCorrect | null;
   public flameGraph = {} as JobFlameGraph;
 
-  public graphType = 'on_cpu';
+  public graphType = 'on_cpu' as string;

Review Comment:
   This cast is redundant. Also it should be readonly since it is only used on 
line 69.
   
   A better way of doing this is to use a enum to manage the graphType rather 
than string:
   ```typescript
   enum FlameGraphType {
       ON_CPU = 'on_cpu',
       OFF_CPU = 'off_cpu',
       FULL = 'full'
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to