Skip to content

Commit

Permalink
Fix the data source at the flyout details tab
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Mar 13, 2024
1 parent 0f87cc5 commit 6e7acf9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const handlePromise = (
export const AccelerationDetailsFlyout = ({
acceleration: selectedAcc,
}: AccelerationDetailsFlyoutProps) => {
const { index, acceleration } = selectedAcc;
const { index, dataSourceName, acceleration } = selectedAcc;
const { flintIndexName } = acceleration;
const [selectedTab, setSelectedTab] = useState('details');
const tabsMap: { [key: string]: any } = {

Check warning on line 63 in public/components/datasources/components/manage/accelerations/acceleration_details_flyout.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
Expand Down Expand Up @@ -172,7 +172,7 @@ export const AccelerationDetailsFlyout = ({

// Only pass all props to AccelerationDetailsTab
if (tab === 'details') {
propsForTab = { acceleration, settings, mappings, indexInfo };
propsForTab = { acceleration, settings, mappings, indexInfo, dataSourceName };
console.log('propsForTabDetails: ', propsForTab);
}
if (tab === 'schema') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export const AccelerationTable = ({ dataSourceName }: AccelerationTableProps) =>
renderAccelerationDetailsFlyout({
index: displayName,
acceleration,
dataSourceName,
});
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ interface AccelerationDetailsTabProps {
settings: object;
mappings: object;
indexInfo: any;

Check warning on line 31 in public/components/datasources/components/manage/accelerations/flyout_modules/acceleration_details_tab.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
dataSourceName: string;
}

export const AccelerationDetailsTab = ({
acceleration,
settings,
mappings,
indexInfo,
dataSourceName,
}: AccelerationDetailsTabProps) => {
const isSkippingIndex =
mappings?.data?.[acceleration.flintIndexName]?.mappings?._meta?.kind === 'skipping';
Expand Down Expand Up @@ -107,7 +109,7 @@ export const AccelerationDetailsTab = ({
<EuiFlexGroup direction="row">
<DetailComponent
title="Data source connection"
description={<EuiLink onClick={() => console.log()}>{'mys3'}</EuiLink>}
description={<EuiLink onClick={() => console.log()}>{dataSourceName}</EuiLink>}
/>
<DetailComponent title="Database" description={acceleration.database} />
<DetailComponent title="Table" description={acceleration.table || '-'} />
Expand Down

0 comments on commit 6e7acf9

Please sign in to comment.