This is an automated email from the ASF dual-hosted git repository. heneveld pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
commit 63c520386f605bf4c1db943587e46a490ece0c6a Author: Alex Heneveld <[email protected]> AuthorDate: Mon Jun 26 13:55:21 2023 +0100 sort tasks by start time if end times are the same --- .../app-inspector/app/components/task-list/task-list.directive.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui-modules/app-inspector/app/components/task-list/task-list.directive.js b/ui-modules/app-inspector/app/components/task-list/task-list.directive.js index d951609b..689ed909 100644 --- a/ui-modules/app-inspector/app/components/task-list/task-list.directive.js +++ b/ui-modules/app-inspector/app/components/task-list/task-list.directive.js @@ -102,7 +102,10 @@ export function taskListDirective() { if (t1.endTimeUtc) return 1; return -1; } - return t2.endTimeUtc - t1.endTimeUtc; + return t2.endTimeUtc - t1.endTimeUtc || + // if same end time, sort by start time + (t2.startTimeUtc && t1.startTimeUtc && t2.startTimeUtc - t1.startTimeUtc) || + (t2.submitTimeUtc && t1.submitTimeUtc && t2.submitTimeUtc - t1.submitTimeUtc); }); // do this to update the counts
