You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/09 02:18:27 UTC
[GitHub] [flink] yangjunhan commented on a diff in pull request #21432: [FLINK-30250][web][flame-graph] Fix the bug that show the flame graph of old type
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org