diff --git a/static_report/src/components/Reports/ReportContextBar.tsx b/static_report/src/components/Reports/ReportContextBar.tsx index af5b2ea30..1151f1af5 100644 --- a/static_report/src/components/Reports/ReportContextBar.tsx +++ b/static_report/src/components/Reports/ReportContextBar.tsx @@ -1,12 +1,4 @@ -import { - Box, - Flex, - FlexProps, - Icon, - Link, - Text, - Tooltip, -} from '@chakra-ui/react'; +import { Box, Flex, FlexProps, Link, Text, Tooltip } from '@chakra-ui/react'; import { ReactNode } from 'react'; import { BiPlug } from 'react-icons/bi'; import { BsGearWideConnected } from 'react-icons/bs'; @@ -53,7 +45,7 @@ export function ReportContextBar({ gitBranch = report.datasource?.git_branch; skipDataSource = report.datasource?.skip_datasource; reportFrom = report.datasource?.skip_datasource - ? 'Manifest File' + ? 'Manifest file' : report.datasource.type; } else { const report = data as ComparisonReportSchema; @@ -83,10 +75,10 @@ export function ReportContextBar({ report.input?.datasource.skip_datasource; const baseFrom = report.base?.datasource.skip_datasource - ? 'Manifest File' + ? 'Manifest file' : report.base?.datasource.type; const targetFrom = report.input?.datasource.skip_datasource - ? 'Manifest File' + ? 'Manifest file' : report.input?.datasource.type; if (baseFrom !== targetFrom) { @@ -104,10 +96,10 @@ export function ReportContextBar({ label="Connect PipeRider to your datasource for full schema info" placement="top-start" > - + ) : ( - + ); }; @@ -115,6 +107,10 @@ export function ReportContextBar({ reportFrom: string | undefined, skipDataSource: boolean | undefined, ) => { + let source = reportFrom; + if (reportFrom !== undefined && reportFrom !== 'Manifest file') { + source = `${reportFrom} connection`; + } return ( {showIcon(skipDataSource)} @@ -125,7 +121,7 @@ export function ReportContextBar({ textOverflow="ellipsis" overflow="hidden" > - source: {reportFrom} + source: {source} ); diff --git a/static_report/src/components/Tables/TableList/TableColumnSchemaList.tsx b/static_report/src/components/Tables/TableList/TableColumnSchemaList.tsx index 15bd60689..c972d1854 100644 --- a/static_report/src/components/Tables/TableList/TableColumnSchemaList.tsx +++ b/static_report/src/components/Tables/TableList/TableColumnSchemaList.tsx @@ -24,11 +24,13 @@ import { CompColEntryItem } from '../../../lib'; interface Props extends Comparable { columns?: CompColEntryItem[]; visibleDetail?: boolean; //for reuse in other pages + skipDataSource?: boolean; } export function TableColumnSchemaList({ columns, singleOnly, visibleDetail = false, + skipDataSource, }: Props) { const isNotSingle = !singleOnly; @@ -101,7 +103,9 @@ export function TableColumnSchemaList({ borderRight={isNotSingle ? '1px solid lightgray' : ''} > - {baseColumn?.schema_type ?? NO_VALUE} + {skipDataSource + ? '-' + : baseColumn?.schema_type ?? NO_VALUE} {isNotSingle ? ( diff --git a/static_report/src/pages/CRTableDetailPage.tsx b/static_report/src/pages/CRTableDetailPage.tsx index b778a4817..b0d77830d 100644 --- a/static_report/src/pages/CRTableDetailPage.tsx +++ b/static_report/src/pages/CRTableDetailPage.tsx @@ -210,7 +210,10 @@ export default function CRTableDetailPage() { - + @@ -247,7 +250,7 @@ function ComparableGridHeader() { ); } -function TableColumnSchemaCompList({ tableEntry }) { +function TableColumnSchemaCompList({ tableEntry, skipDataSource }) { const [ , { base: baseTableColEntry, target: targetTableColEntry }, @@ -300,7 +303,9 @@ function TableColumnSchemaCompList({ tableEntry }) { borderRightColor="gray.200" > - {baseColumn?.schema_type ?? NO_VALUE} + {skipDataSource + ? '-' + : baseColumn?.schema_type ?? NO_VALUE} @@ -320,7 +325,9 @@ function TableColumnSchemaCompList({ tableEntry }) { - {targetColumn?.schema_type ?? NO_VALUE} + {skipDataSource + ? '-' + : targetColumn?.schema_type ?? NO_VALUE} @@ -369,7 +376,7 @@ function TableColumnSchemaCompList({ tableEntry }) { - {column?.schema_type ?? NO_VALUE} + {skipDataSource ? '-' : column?.schema_type ?? NO_VALUE} diff --git a/static_report/src/pages/SRTableDetailPage.tsx b/static_report/src/pages/SRTableDetailPage.tsx index 690e5bf65..1f2f74759 100644 --- a/static_report/src/pages/SRTableDetailPage.tsx +++ b/static_report/src/pages/SRTableDetailPage.tsx @@ -13,7 +13,6 @@ import { TableColumnHeader } from '../components/Tables/TableColumnHeader'; import { useReportStore } from '../utils/store'; import { useTableRoute } from '../utils/routes'; import { SkipDataSource } from '../components/Common/SkipDataSource'; -import { sk } from 'date-fns/locale'; export default function SRTableDetailPage() { let { tableName, uniqueId } = useTableRoute(); @@ -88,7 +87,7 @@ export default function SRTableDetailPage() { - + );