Skip to content

Commit 1b448e1

Browse files
committed
fix: heap comparator for lines incorrectly handles state
1 parent d902c32 commit 1b448e1

File tree

2 files changed

+3
-3
lines changed
  • plugins/plugin-codeflare-dashboard/src/controller/dashboard/status

2 files changed

+3
-3
lines changed

Diff for: plugins/plugin-codeflare-dashboard/src/controller/dashboard/status/Live.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default class Live {
4646
return a.timestamp - b.timestamp
4747
}
4848

49-
const stateDiff = b.stateRank - a.stateRank
49+
const stateDiff = a.stateRank - b.stateRank
5050
if (stateDiff !== 0) {
5151
return stateDiff
5252
} else {

Diff for: plugins/plugin-codeflare-dashboard/src/controller/dashboard/status/states.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export type WorkerState = (typeof states)[number]
2222
/** Lower means more important */
2323
export const rankFor: Record<WorkerState, number> = {
2424
Queued: 3,
25-
Provisioning: 1,
26-
Initializing: 2,
25+
Provisioning: 2,
26+
Initializing: 4,
2727
Running: 1,
2828
Success: 0,
2929
Failed: 0,

0 commit comments

Comments
 (0)