Skip to content

Commit

Permalink
Resolved lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
praveen5959 committed Dec 20, 2024
1 parent 751ae35 commit 4f3ec2a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/components/Navbar/components/CorrelationIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ export const CorrelationIcon = forwardRef<
/>
</svg>
));

CorrelationIcon.displayName = 'CorrelationIcon';
2 changes: 1 addition & 1 deletion src/pages/Correlation/Views/CorrelationTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 } : {}),
},
};
},
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Correlation/components/MultiEventTimeLineGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
};

Expand Down Expand Up @@ -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') {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Correlation/components/StreamSelectBox.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -10,7 +11,7 @@ type StreamSelectBoxProps = {
isFirst: boolean;
};

export const StreamSelectBox: React.FC<StreamSelectBoxProps> = ({
export const StreamSelectBox: FC<StreamSelectBoxProps> = ({
label,
placeholder,
disabled,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Correlation/providers/CorrelationProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, any>;
Expand Down

0 comments on commit 4f3ec2a

Please sign in to comment.