Skip to content

Commit

Permalink
Fix integration imports for table and card view (#2147)
Browse files Browse the repository at this point in the history
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
(cherry picked from commit 7a63a9e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Sep 9, 2024
1 parent 0dca1ff commit 034aaa0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) {
truncateText: true,
render: (value, record) => (
<EuiText data-test-subj={`${record.templateName}IntegrationDescription`}>
{truncate(record.dataSourceMDSLabel || 'Local cluster', { length: 100 })}
{_.truncate(record.dataSourceMDSLabel || 'Local cluster', { length: 100 })}
</EuiText>
),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@
*/

import {
EuiPanel,
EuiButtonGroup,
EuiCard,
EuiCompressedFieldSearch,
EuiFlexGroup,
EuiFlexItem,
EuiPanel,
EuiSpacer,
EuiCompressedFieldSearch,
EuiButtonGroup,
} from '@elastic/eui';
import _ from 'lodash';
import React, { useState } from 'react';
import {
AvailableIntegrationsCardViewProps,
AvailableIntegrationType,
} from './available_integration_overview_page';
import { INTEGRATIONS_BASE } from '../../../../common/constants/shared';
import { badges } from './integration_category_badge_group';
import { basePathLink } from '../../../../common/utils/shared';
import { AvailableIntegrationsCardViewProps } from './available_integration_overview_page';
import { badges } from './integration_category_badge_group';

export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) {
const [toggleIconIdSelected, setToggleIconIdSelected] = useState('1');
Expand Down Expand Up @@ -57,7 +53,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi
}
};

const renderRows = (integrations: AvailableIntegrationType[]) => {
const renderRows = (integrations: IntegrationConfig[]) => {
if (!integrations || !integrations.length) return null;
return (
<>
Expand All @@ -68,11 +64,11 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi
<EuiCard
icon={getImage(
basePathLink(
`${INTEGRATIONS_BASE}/repository/${i.name}/static/${i.statics.logo.path}`
`${INTEGRATIONS_BASE}/repository/${i.name}/static/${i.statics?.logo?.path}`
)
)}
title={i.displayName ? i.displayName : i.name}
description={i.description}
description={i.description ?? ''}
data-test-subj={`integration_card_${i.name.toLowerCase()}`}
titleElement="span"
href={basePathLink(`/app/integrations#/available/${i.name}`)}
Expand Down

0 comments on commit 034aaa0

Please sign in to comment.