Skip to content

Commit b4d7c28

Browse files
authored
Merge pull request #19578 from jeclrsg/hpcc-33392-metrics-kind-formatting
HPCC-33392 ECL Watch v9 Metrics Kind formatting
2 parents 0e41710 + ccc79b8 commit b4d7c28

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

esp/src/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esp/src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@hpcc-js/chart": "2.86.0",
4848
"@hpcc-js/codemirror": "2.65.0",
4949
"@hpcc-js/common": "2.73.0",
50-
"@hpcc-js/comms": "2.99.0",
50+
"@hpcc-js/comms": "2.99.1",
5151
"@hpcc-js/dataflow": "8.1.7",
5252
"@hpcc-js/eclwatch": "2.76.1",
5353
"@hpcc-js/graph": "2.87.0",

esp/src/src-react/components/MetricsScopes.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,16 @@ export class ScopesTable extends Table {
4141
field = filter.substring(0, colonIdx);
4242
}
4343
if (field) {
44-
const value: string = !matchCase ? row[field]?.toString().toLowerCase() : row[field]?.toString();
44+
const rawValue: string = !matchCase ? row[field]?.toString().toLowerCase() : row[field]?.toString();
45+
const formattedValue: string = !matchCase ? row.__formattedProps[field]?.toString().toLowerCase() : row.__formattedProps[field]?.toString();
4546
const filterValue: string = !matchCase ? filter.toLowerCase() : filter;
46-
return value?.indexOf(filterValue.substring(colonIdx + 1)) >= 0 ?? false;
47+
return (rawValue?.indexOf(filterValue.substring(colonIdx + 1)) >= 0 || formattedValue?.indexOf(filterValue.substring(colonIdx + 1)) >= 0) ?? false;
4748
}
4849
for (const field in row) {
49-
const value: string = !matchCase ? row[field].toString().toLowerCase() : row[field].toString();
50+
const rawValue: string = !matchCase ? row[field]?.toString().toLowerCase() : row[field]?.toString();
51+
const formattedValue: string = !matchCase ? row.__formattedProps[field]?.toString().toLowerCase() : row.__formattedProps[field]?.toString();
5052
const filterValue: string = !matchCase ? filter.toLowerCase() : filter;
51-
return value?.indexOf(filterValue) >= 0 ?? false;
53+
return (rawValue?.indexOf(filterValue) >= 0 || formattedValue?.indexOf(filterValue) >= 0) ?? false;
5254
}
5355
return false;
5456
}

0 commit comments

Comments
 (0)