Airblader commented on a change in pull request #17557:
URL: https://github.com/apache/flink/pull/17557#discussion_r735520954
##########
File path:
flink-runtime-web/web-dashboard/src/app/pages/job/overview/subtasks/job-overview-drawer-subtasks.component.ts
##########
@@ -45,9 +45,9 @@ export class JobOverviewDrawerSubtasksComponent implements
OnInit, OnDestroy {
sortWriteRecordsFn = this.sortFn('metrics.write-records');
sortAttemptFn = this.sortFn('attempt');
sortHostFn = this.sortFn('host');
- sortStartTimeFn = this.sortFn('detail.start-time');
- sortDurationFn = this.sortFn('detail.duration');
- sortEndTimeFn = this.sortFn('detail.end-time');
+ sortStartTimeFn = this.sortFn('start-time');
+ sortDurationFn = this.sortFn('duration');
+ sortEndTimeFn = this.sortFn('end-time');
sortStatusFn = this.sortFn('status');
sortFn(path: string): NzTableSortFn<JobSubTaskInterface> {
Review comment:
Ideally we should improve the type signatur here to avoid mistakes like
that. Unfortunately the interface has dashed keys, which makes this even
harder. A good first compromise could be
```
sortFn(path: keyof JobSubTaskInterface | string): …
```
This would auto-complete top-level keys, but still also arbitrary strings
for the `metrics.*` case. Anyway, this might be future work.
--
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]