Skip to content

Commit 6426e9d

Browse files
committed
fix: lines output was showing least interesting events
also show 6 not 18 lines
1 parent 64e2659 commit 6426e9d

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ export default class Live {
4242
/** Model of the lines of output */
4343
private readonly lines = new Heap<Line>((a, b) => {
4444
if (a.line === b.line) {
45-
return 0
45+
return a.timestamp - b.timestamp
4646
}
4747

48-
const stateDiff = a.stateRank - b.stateRank
48+
const stateDiff = b.stateRank - a.stateRank
4949
if (stateDiff !== 0) {
5050
return stateDiff
5151
} else {
@@ -160,7 +160,7 @@ export default class Live {
160160

161161
return this.lines
162162
.toArray()
163-
.slice(0, 18)
163+
.slice(0, 6)
164164
.sort((a, b) => a.timestamp - b.timestamp)
165165
}
166166

0 commit comments

Comments
 (0)