diff --git a/Dashboard/src/Components/Monitor/SummaryView/EvaluationLogList.tsx b/Dashboard/src/Components/Monitor/SummaryView/EvaluationLogList.tsx index 84f22a67e2..5f24f29fe3 100644 --- a/Dashboard/src/Components/Monitor/SummaryView/EvaluationLogList.tsx +++ b/Dashboard/src/Components/Monitor/SummaryView/EvaluationLogList.tsx @@ -26,7 +26,9 @@ interface FilterGroup { } // Group identical filter messages so we can surface helpful metadata once per row. -const groupFiltersByMessage = ( +const groupFiltersByMessage: ( + filters: Array, +) => Array = ( filters: Array, ): Array => { const groups: Array = []; @@ -85,7 +87,6 @@ const EvaluationLogList: FunctionComponent = ( return event.type !== "criteria-met" && event.type !== "criteria-not-met"; }); - if (!hasCriteriaResults && actionEvents.length === 0) { return <>; } @@ -160,28 +161,44 @@ const EvaluationLogList: FunctionComponent = ( const uniqueFilterTypes: Array = Array.from( new Set( filterGroup.occurrences - .map((filter: MonitorEvaluationFilterResult) => { - return filter.filterType; - }) - .filter((value): value is FilterType => { - return value !== undefined; - }), + .map( + ( + filter: MonitorEvaluationFilterResult, + ): FilterType | undefined => { + return filter.filterType; + }, + ) + .filter( + ( + value: FilterType | undefined, + ): value is FilterType => { + return value !== undefined; + }, + ), ), - ).map((value: FilterType) => { + ).map((value: FilterType): string => { return value.toString(); }); const thresholdValues: Array = Array.from( new Set( filterGroup.occurrences - .map((filter: MonitorEvaluationFilterResult) => { - return filter.value; - }) - .filter((value): value is number | string => { - return value !== undefined && value !== null; - }), + .map( + ( + filter: MonitorEvaluationFilterResult, + ): string | number | undefined => { + return filter.value; + }, + ) + .filter( + ( + value: string | number | undefined, + ): value is number | string => { + return value !== undefined && value !== null; + }, + ), ), - ).map((value: number | string) => { + ).map((value: number | string): string => { return value.toString(); }); @@ -361,7 +378,10 @@ const EvaluationLogList: FunctionComponent = ( className="flex items-start space-x-3 rounded-md border border-gray-100 bg-gray-50 p-3" >
- +