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 2021/10/25 11:50:15 UTC

[GitHub] [flink] Airblader commented on a change in pull request #17557: [FLINK-24629][runtime-web] Fix invalid sorting functions under pages of vertex subtasks and taskmanagers

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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org