diff --git a/src/components/Navbar/components/CorrelationIcon.tsx b/src/components/Navbar/components/CorrelationIcon.tsx index a9b503ee..533b4d16 100644 --- a/src/components/Navbar/components/CorrelationIcon.tsx +++ b/src/components/Navbar/components/CorrelationIcon.tsx @@ -26,3 +26,5 @@ export const CorrelationIcon = forwardRef< /> )); + +CorrelationIcon.displayName = 'CorrelationIcon'; diff --git a/src/pages/Correlation/Views/CorrelationTable.tsx b/src/pages/Correlation/Views/CorrelationTable.tsx index a88c0e16..c3dc416c 100644 --- a/src/pages/Correlation/Views/CorrelationTable.tsx +++ b/src/pages/Correlation/Views/CorrelationTable.tsx @@ -113,7 +113,7 @@ const Table = (props: { overflow: 'hidden', textOverflow: 'ellipsis', display: 'table-cell', - ...(!_.includes(wrapDisabledColumns, columnName) ? { whiteSpace: 'nowrap' as 'nowrap' } : {}), + ...(!_.includes(wrapDisabledColumns, columnName) ? { whiteSpace: 'nowrap' as const } : {}), }, }; }, diff --git a/src/pages/Correlation/components/MultiEventTimeLineGraph.tsx b/src/pages/Correlation/components/MultiEventTimeLineGraph.tsx index 4fab001e..77847838 100644 --- a/src/pages/Correlation/components/MultiEventTimeLineGraph.tsx +++ b/src/pages/Correlation/components/MultiEventTimeLineGraph.tsx @@ -108,6 +108,7 @@ const generateCountQuery = ( whereClause: string, ) => { const range = compactTypeIntervalMap[compactType]; + /* eslint-disable no-useless-escape */ return `SELECT DATE_BIN('${range}', p_timestamp, '${startTime.toISOString()}') AS date_bin_timestamp, COUNT(*) AS log_count FROM \"${streamName}\" WHERE p_timestamp BETWEEN '${startTime.toISOString()}' AND '${endTime.toISOString()}' AND ${whereClause} GROUP BY date_bin_timestamp ORDER BY date_bin_timestamp`; }; @@ -148,7 +149,7 @@ const getAllIntervals = (start: Date, end: Date, compactType: CompactInterval): }; const incrementDateByCompactType = (date: Date, type: CompactInterval): Date => { - let tempDate = new Date(date); + const tempDate = new Date(date); if (type === 'minute') { tempDate.setMinutes(tempDate.getMinutes() + 1); } else if (type === 'hour') { diff --git a/src/pages/Correlation/components/StreamSelectBox.tsx b/src/pages/Correlation/components/StreamSelectBox.tsx index c12e186f..b848e2c7 100644 --- a/src/pages/Correlation/components/StreamSelectBox.tsx +++ b/src/pages/Correlation/components/StreamSelectBox.tsx @@ -1,5 +1,6 @@ import { Select, Text } from '@mantine/core'; import classes from '../styles/Correlation.module.css'; +import { FC } from 'react'; type StreamSelectBoxProps = { label: string; @@ -10,7 +11,7 @@ type StreamSelectBoxProps = { isFirst: boolean; }; -export const StreamSelectBox: React.FC = ({ +export const StreamSelectBox: FC = ({ label, placeholder, disabled, diff --git a/src/pages/Correlation/providers/CorrelationProvider.tsx b/src/pages/Correlation/providers/CorrelationProvider.tsx index 6604ebe7..36304a53 100644 --- a/src/pages/Correlation/providers/CorrelationProvider.tsx +++ b/src/pages/Correlation/providers/CorrelationProvider.tsx @@ -16,7 +16,7 @@ export const FIELD_BACKGROUND_COLORS = ['#FFF8F8', '#F8F1FF']; export const DATA_TYPE_COLORS = ['#B68A96', '#AB92C0']; const defaultSortKey = 'p_timestamp'; -const defaultSortOrder = 'desc' as 'desc'; +const defaultSortOrder = 'desc' as const; type ReducerOutput = { streamData?: Record;