From bcf8a111c668df566c7c013f04db14ecd17944d6 Mon Sep 17 00:00:00 2001 From: Remy Jette Date: Fri, 10 Nov 2023 12:57:47 -0800 Subject: [PATCH] WebHost: Sort tracker last activity 'None' as maximum instead of -1 When managing an async, it can be useful to sort the tracker by Last Activity to see who has potentially abandoned their slots. Today, if a slot hasn't been started (last activity is None) then it is sorted as if last activity is -1, that it is it has had more recent activity than any other slot. This change makes it so slots that haven't started are treated as if they have last activity MAX_VALUE time ago. This way they get sorted with slots that haven't been touched in a long time which should make intuitive sense as the "last activity" is effectively inf time ago. --- WebHostLib/static/assets/trackerCommon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebHostLib/static/assets/trackerCommon.js b/WebHostLib/static/assets/trackerCommon.js index 41c4020dace8..cb16a4de782d 100644 --- a/WebHostLib/static/assets/trackerCommon.js +++ b/WebHostLib/static/assets/trackerCommon.js @@ -55,7 +55,7 @@ window.addEventListener('load', () => { render: function (data, type, row) { if (type === "sort" || type === 'type') { if (data === "None") - return -1; + return Number.MAX_VALUE; return parseInt(data); }