Skip to content

Commit

Permalink
feature(fe): monitored tables dashboard. Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyNenashev committed Nov 7, 2023
1 parent aad4b1f commit 048be07
Show file tree
Hide file tree
Showing 43 changed files with 280 additions and 247 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export const Wrapper = styled(Grid)<{ $alignItems?: CSSObject['alignItems'] }>(
flexWrap: 'nowrap',
alignItems: $alignItems,
justifyContent: 'flex-end',
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ const AlertsList: React.FC<AlertsListProps> = ({ fetchAlerts }) => {
loader={isAlertsFetching && <DataEntityAlertsSkeleton length={5} />}
scrollableTarget='alerts-list'
>
{alerts?.map(alert => (
<AlertItem key={alert.id} alert={alert} />
))}
{alerts?.map(alert => <AlertItem key={alert.id} alert={alert} />)}
</InfiniteScroll>
</S.AlertsContainer>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const Container = styled(Grid)(
({
position: 'relative',
flexWrap: 'nowrap',
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ const ActivityItem: React.FC<ActivityItemProps> = ({ activity, hideAllDetails })
)}
{isTypeRelatedTo([ActivityEventType.DATASET_FIELD_DESCRIPTION_UPDATED]) && (
<StringActivityField
activityName={`${t('Dataset field')} ${
activity.oldState.datasetFieldInformation?.name
} ${t('description')}`}
activityName={`${t('Dataset field')} ${activity.oldState
.datasetFieldInformation?.name} ${t('description')}`}
oldState={activity.oldState.datasetFieldInformation?.description}
newState={activity.newState.datasetFieldInformation?.description}
hideAllDetails={hideAllDetails}
Expand All @@ -108,9 +107,8 @@ const ActivityItem: React.FC<ActivityItemProps> = ({ activity, hideAllDetails })
)}
{isTypeRelatedTo([ActivityEventType.DATASET_FIELD_TAGS_UPDATED]) && (
<ArrayActivityField
activityName={`${t('Tags')} ${t('in')} ${
activity.oldState.datasetFieldInformation?.name
} ${t('column')}`}
activityName={`${t('Tags')} ${t('in')} ${activity.oldState
.datasetFieldInformation?.name} ${t('column')}`}
oldState={activity.oldState.datasetFieldInformation?.tags}
newState={activity.newState.datasetFieldInformation?.tags}
hideAllDetails={hideAllDetails}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ContentContainer = styled(Grid)(
alignItems: 'baseline',
flexWrap: 'nowrap',
position: 'relative',
} as CSSObject)
}) as CSSObject
);

export const InfoContainer = styled('div')(
Expand All @@ -27,5 +27,5 @@ export const InfoContainer = styled('div')(
alignItems: 'center',
position: 'absolute',
right: 0,
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export const Wrapper = styled(Grid)(
flexWrap: 'nowrap',
alignItems: 'center',
justifyContent: 'flex-end',
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const Container = styled('div')(
display: 'flex',
width: `100%`,
flexWrap: 'nowrap',
} as CSSObject)
}) as CSSObject
);

export const CollapseContainer = styled('div')<{ $visibility: boolean }>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export const TagsContainer = styled(Box)(
alignItems: 'center',
justifyContent: 'flex-start',
flexWrap: 'wrap',
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export const TagListContainer = styled(Box)(
alignItems: 'center',
justifyContent: 'flex-start',
flexWrap: 'wrap',
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Scrollable = styled('div')(
width: '100%',
overflowY: 'auto',
contain: 'strict',
} as CSSObject)
}) as CSSObject
);

export const Container = styled('div')<{ $height: number }>(({ $height }) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export const LineageViewContainer = styled('div')(
width: '100%',
height: '100%',
position: 'relative',
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export const Container = styled('svg')(
height: '100%',
top: 0,
left: 0,
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ZoomWrapper = styled('div')(
position: 'absolute',
top: 0,
left: 0,
} as CSSObject)
}) as CSSObject
);

export const ZoomContainer = styled('div')(
Expand All @@ -28,5 +28,5 @@ export const ZoomContainer = styled('div')(
top: 0,
left: 0,
transformOrigin: '0 0',
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const TitleContainer = styled(Typography)(
({
wordBreak: 'break-all',
'&:hover': { cursor: 'pointer' },
} as CSSObject)
}) as CSSObject
);

export const SourceContainer = styled('div')(({ theme }) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const TitleWrapper = styled('div')<{ $fullNames: boolean }>(
overflow: $fullNames ? 'initial' : 'hidden',
textOverflow: $fullNames ? 'initial' : 'ellipsis',
whiteSpace: $fullNames ? 'initial' : 'nowrap',
} as CSSObject)
}) as CSSObject
);

export const UnknownEntityNameCircle = styled('circle')(({ theme }) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const TooltipStyles = {
};

export const BarContainer = styled(Grid)(
() => ({ flexWrap: 'nowrap', marginTop: '3px', columnGap: '2px' } as CSSObject)
() => ({ flexWrap: 'nowrap', marginTop: '3px', columnGap: '2px' }) as CSSObject
);

export const Bar = styled(LinearProgress)<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,18 @@ const OverviewDataConsumerStats: React.FC<OverviewDataConsumerStatsProps> = ({
</Typography>
</Grid>
<Grid item container xs={12} direction='column' alignItems='flex-start'>
{inputs?.slice(0, displayedEntitiesNumber).map(input => (
<Button
text={input.internalName || input.externalName}
to={dataEntityOverviewPath(input.id)}
key={input.id}
sx={{ my: 0.25 }}
buttonType='tertiary-m'
onClick={() => {}}
/>
))}
{inputs
?.slice(0, displayedEntitiesNumber)
.map(input => (
<Button
text={input.internalName || input.externalName}
to={dataEntityOverviewPath(input.id)}
key={input.id}
sx={{ my: 0.25 }}
buttonType='tertiary-m'
onClick={() => {}}
/>
))}
{unknownInputsCount ? (
<Typography sx={{ ml: 0.5 }} variant='subtitle1'>
{unknownInputsCount} {t('more source')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@ const OverviewDataInputStats: React.FC<OverviewDataInputStatsProps> = ({
<Typography variant='h4'>{t('outputs')}</Typography>
</Grid>
<Grid item container xs={12} direction='column' alignItems='flex-start'>
{outputs?.slice(0, displayedEntitiesNumber).map(output => (
<Button
text={output.internalName || output.externalName}
to={dataEntityOverviewPath(output.id)}
key={output.id}
sx={{ my: 0.25 }}
buttonType='tertiary-m'
/>
))}
{outputs
?.slice(0, displayedEntitiesNumber)
.map(output => (
<Button
text={output.internalName || output.externalName}
to={dataEntityOverviewPath(output.id)}
key={output.id}
sx={{ my: 0.25 }}
buttonType='tertiary-m'
/>
))}
{unknownOutputsCount ? (
<Typography variant='subtitle1' sx={{ ml: 0.5 }}>
{unknownOutputsCount} {t('more output')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export const Container = styled('div')(
display: 'flex',
flexDirection: 'column',
maxHeight: '488px',
} as CSSObject)
}) as CSSObject
);

export const Header = styled('div')(
() =>
({
display: 'flex',
flexDirection: 'column',
} as CSSObject)
}) as CSSObject
);

export const HeaderContent = styled('div')(({ theme }) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,17 @@ const OverviewQualityTestStats: React.FC<OverviewQualityTestStatsProps> = ({
{datasetsList?.length || 0}{' '}
{`dataset${datasetsList?.length === 1 ? '' : 's'}`}
</Typography>
{datasetsList?.slice(0, displayedEntitiesNumber).map(dataset => (
<Button
text={dataset.internalName || dataset.externalName}
to={dataEntityOverviewPath(dataset.id)}
key={dataset.id}
sx={{ my: 0.25, maxWidth: '100%' }}
buttonType='link-m'
/>
))}
{datasetsList
?.slice(0, displayedEntitiesNumber)
.map(dataset => (
<Button
text={dataset.internalName || dataset.externalName}
to={dataEntityOverviewPath(dataset.id)}
key={dataset.id}
sx={{ my: 0.25, maxWidth: '100%' }}
buttonType='link-m'
/>
))}
{datasetsList && datasetsList.length > displayedEntitiesNumber ? (
<EntitiesListModal
entities={datasetsList}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ const OverviewTransformerStats: React.FC<OverviewTransformerStatsProps> = ({
alignItems='flex-start'
sx={{ mt: 1 }}
>
{sources?.slice(0, displayedEntitiesNumber).map(source => (
<Button
text={source.internalName || source.externalName}
to={dataEntityOverviewPath(source.id)}
key={source.id}
buttonType='link-m'
sx={{ my: 0.25 }}
/>
))}
{sources
?.slice(0, displayedEntitiesNumber)
.map(source => (
<Button
text={source.internalName || source.externalName}
to={dataEntityOverviewPath(source.id)}
key={source.id}
buttonType='link-m'
sx={{ my: 0.25 }}
/>
))}
{unknownSourcesCount ? (
<Typography variant='subtitle1' sx={{ ml: 0.5 }}>
{unknownSourcesCount} {t('more source')}
Expand Down Expand Up @@ -95,15 +97,17 @@ const OverviewTransformerStats: React.FC<OverviewTransformerStatsProps> = ({
alignItems='flex-start'
sx={{ mt: 1 }}
>
{targets?.slice(0, displayedEntitiesNumber).map(target => (
<Button
text={target.internalName || target.externalName}
to={dataEntityOverviewPath(target.id)}
key={target.id}
sx={{ my: 0.25 }}
buttonType='link-m'
/>
))}
{targets
?.slice(0, displayedEntitiesNumber)
.map(target => (
<Button
text={target.internalName || target.externalName}
to={dataEntityOverviewPath(target.id)}
key={target.id}
sx={{ my: 0.25 }}
buttonType='link-m'
/>
))}
{unknownTargetsCount ? (
<Typography variant='subtitle1' sx={{ ml: 0.5 }}>
{unknownTargetsCount} {t('more target')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export const TagsContainer = styled(Box)(
alignItems: 'center',
justifyContent: 'flex-start',
flexWrap: 'wrap',
} as CSSObject)
}) as CSSObject
);
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export const TagListContainer = styled(Box)(
alignItems: 'center',
justifyContent: 'flex-start',
flexWrap: 'wrap',
} as CSSObject)
}) as CSSObject
);
Loading

0 comments on commit 048be07

Please sign in to comment.