diff --git a/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/ConnectDbBody/parts/Cloud.tsx b/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/ConnectDbBody/parts/Cloud.tsx index b24a4a6c689..670ca0060ce 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/ConnectDbBody/parts/Cloud.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/ConnectDbBody/parts/Cloud.tsx @@ -28,7 +28,7 @@ export const Cloud = ({ )} diff --git a/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/components/ConnectGDCSourceWidget/ConnectGDCSourceWidget.tsx b/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/components/ConnectGDCSourceWidget/ConnectGDCSourceWidget.tsx index d780499abb3..06ff3857cfb 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/components/ConnectGDCSourceWidget/ConnectGDCSourceWidget.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/ConnectDBRedesign/components/ConnectGDCSourceWidget/ConnectGDCSourceWidget.tsx @@ -17,9 +17,9 @@ import { adaptGraphQLCustomization } from '../GraphQLCustomization/utils/adaptRe import { generateGDCRequestPayload } from './utils/generateRequest'; import { hasuraToast } from '../../../../new-components/Toasts'; import { useManageDatabaseConnection } from '../../hooks/useManageDatabaseConnection'; -import { capitaliseFirstLetter } from '../../../../components/Common/ConfigureTransformation/utils'; import { Collapsible } from '../../../../new-components/Collapsible'; import { DisplayToastErrorMessage } from '../Common/DisplayToastErrorMessage'; +import { useAvailableDrivers } from '../../../ConnectDB/hooks'; interface ConnectGDCSourceWidgetProps { driver: string; @@ -57,6 +57,10 @@ export const ConnectGDCSourceWidget = (props: ConnectGDCSourceWidgetProps) => { const { driver, dataSourceName } = props; const [tab, setTab] = useState('connection_details'); + const { data: drivers } = useAvailableDrivers(); + const driverDisplayName = + drivers?.find(d => d.name === driver)?.displayName ?? driver; + const { data: metadataSource } = useMetadata(m => m.metadata.sources.find(source => source.name === dataSourceName) ); @@ -135,8 +139,8 @@ export const ConnectGDCSourceWidget = (props: ConnectGDCSourceWidgetProps) => {
{isEditMode - ? `Edit ${capitaliseFirstLetter(driver)} Connection` - : `Connect New ${capitaliseFirstLetter(driver)} Database`} + ? `Edit ${driverDisplayName} Connection` + : `Connect ${driverDisplayName} Database`}
[ 'tracked_relationships', @@ -10,18 +9,16 @@ export const getTrackedRelationshipsCacheKey = (dataSourceName: string) => [ ]; export const useTrackedRelationships = (dataSourceName: string) => { - const httpClient = useHttpClient(); - const { suggestedRelationships } = useAllSuggestedRelationships({ dataSourceName, isEnabled: true, omitTracked: false, }); - const fetchRelationships = async () => { - const { metadata } = await exportMetadata({ httpClient }); + const { data: metadata } = useMetadata(m => m.metadata); - const currentMetadataSource = metadata.sources?.find( + const fetchRelationships = async () => { + const currentMetadataSource = metadata?.sources?.find( source => source.name === dataSourceName ); diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Data/hooks/introspection/useDatabaseSchemas.ts b/frontend/libs/console/legacy-ce/src/lib/features/Data/hooks/introspection/useDatabaseSchemas.ts index 029a179a09d..97c9c1ac1e7 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Data/hooks/introspection/useDatabaseSchemas.ts +++ b/frontend/libs/console/legacy-ce/src/lib/features/Data/hooks/introspection/useDatabaseSchemas.ts @@ -20,5 +20,6 @@ export function useGetDatabaseSchemas(dataSourceName: string) { return result; } }, + refetchOnWindowFocus: false, }); } diff --git a/frontend/libs/console/legacy-ce/src/lib/features/Data/hooks/useTrackTables.ts b/frontend/libs/console/legacy-ce/src/lib/features/Data/hooks/useTrackTables.ts index 92a7964226a..b596723e99f 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/Data/hooks/useTrackTables.ts +++ b/frontend/libs/console/legacy-ce/src/lib/features/Data/hooks/useTrackTables.ts @@ -43,6 +43,7 @@ export const useTrackTables = ({ args: { table: trackableTable.table, source: dataSourceName, + configuration: trackableTable.configuration, }, })), }, diff --git a/frontend/libs/console/legacy-ce/src/lib/features/EETrial/components/MultipleJWTSecrets/MultipleJWTSecretsPage.tsx b/frontend/libs/console/legacy-ce/src/lib/features/EETrial/components/MultipleJWTSecrets/MultipleJWTSecretsPage.tsx index 7571269f740..166b8e3c850 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/EETrial/components/MultipleJWTSecrets/MultipleJWTSecretsPage.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/EETrial/components/MultipleJWTSecrets/MultipleJWTSecretsPage.tsx @@ -35,7 +35,7 @@ export const MultipleJWTSecretsPage = () => { {isFeatureActive ? (

- Setup Multiple Admin Secrets + Setup Multiple JWT Secrets
({ connectDatabase: (driver?: string) => driver ? `/data/v2/manage/database/add?driver=${driver}` - : 'data/v2/manage/connect', + : '/data/v2/manage/connect', database: (dataSourceName: string) => encodeURI(`/data/v2/manage/database?database=${dataSourceName}`), table: (dataSourceName: string, table: Table, operation?: string) => {