1996fanrui commented on code in PR #21432:
URL: https://github.com/apache/flink/pull/21432#discussion_r1044086036


##########
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:
   Hi @yangjunhan , thanks a lot for your review.
   
   > This cast is redundant. Also it should be readonly since it is only used 
on line 69.
   
   Actually, the `graphType` isn't readonly. `nz-radio-button` will change the 
graph Type.
   
   > A better way of doing this is to use a enum to manage the graphType rather 
than string.
   
   Great suggestion, updated.



-- 
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