Skip to content

Commit

Permalink
HPCC-30384 ECL Watch fix Data Pattern analysis results ending rows il…
Browse files Browse the repository at this point in the history
…legible

Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com>
  • Loading branch information
jeclrsg committed Nov 7, 2023
1 parent fb5d871 commit 5729b8b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions esp/src/src/DataPatterns/PopularPatterns.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { BreakdownTable } from "@hpcc-js/html";
import { config } from "./config";

const maxRowCount = 64;

export class PopularPatterns extends BreakdownTable {
constructor(rows, showTitle: boolean = true) {
super();
Expand All @@ -25,10 +27,15 @@ export class PopularPatterns extends BreakdownTable {
"font-weight": "normal",
"text-align": "right"
}])
.data(rows.map(row => [
row.data_pattern.trim(),
row.rec_count
]))
.useCalculatedRowCount(false)
.rowCount(6)
.data(rows
.filter((row, idx) => idx < maxRowCount ? row : null)
.map(row => [
row.data_pattern.trim(),
row.rec_count
])
)
;
}
}

0 comments on commit 5729b8b

Please sign in to comment.