diff --git a/openmetadata-ui/src/main/resources/ui/src/axiosAPIs/serviceAPI.ts b/openmetadata-ui/src/main/resources/ui/src/axiosAPIs/serviceAPI.ts index 12abb3e84ef..fec2df9cb42 100644 --- a/openmetadata-ui/src/main/resources/ui/src/axiosAPIs/serviceAPI.ts +++ b/openmetadata-ui/src/main/resources/ui/src/axiosAPIs/serviceAPI.ts @@ -14,6 +14,7 @@ import { AxiosResponse } from 'axios'; import { isNil } from 'lodash'; import { ServiceOption } from 'Models'; +import { ConfigData } from '../interface/service.interface'; import { getURLWithQueryFields } from '../utils/APIUtils'; import APIClient from './index'; @@ -79,3 +80,15 @@ export const deleteService: Function = ( ): Promise => { return APIClient.delete(`/services/${serviceName}/${id}`); }; + +export const TestConnection = ( + data: ConfigData, + type: string +): Promise => { + const payload = { + connection: { config: data }, + connectionType: type, + }; + + return APIClient.post(`/services/ingestionPipelines/testConnection`, payload); +}; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddService/Steps/SelectServiceType.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddService/Steps/SelectServiceType.tsx index c359c819abb..5045826646f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddService/Steps/SelectServiceType.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddService/Steps/SelectServiceType.tsx @@ -101,7 +101,7 @@ const SelectServiceType = ({ theme="primary" variant="text" onClick={onCancel}> - Back + Discard - {status === 'waiting' ? ( + {isEmpty(schema) && ( +
+ No Connection Configs available. +
+ )} +
+
+ {!isEmpty(schema) && onTestConnection && ( + + )} +
+
- ) : status === 'success' ? ( - - ) : ( - - )} + {status === 'waiting' ? ( + + ) : status === 'success' ? ( + + ) : ( + + )} +
); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/success-screen/SuccessScreen.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/success-screen/SuccessScreen.tsx index 85dfa0be54a..f0aabd9bafd 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/success-screen/SuccessScreen.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/success-screen/SuccessScreen.tsx @@ -42,7 +42,7 @@ const SuccessScreen = ({

"{name}" - has been successfuly created + has been created successfully

diff --git a/openmetadata-ui/src/main/resources/ui/src/jsons/en.ts b/openmetadata-ui/src/main/resources/ui/src/jsons/en.ts index 0ca42c161e1..1a2e101577d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/jsons/en.ts +++ b/openmetadata-ui/src/main/resources/ui/src/jsons/en.ts @@ -102,6 +102,8 @@ const jsonData = { 'fetch-webhook-error': 'Error while fetching webhooks!', 'fetch-user-count-error': 'Error while getting users count!', + 'test-connection-error': 'Error while testing connection!', + 'unexpected-server-response': 'Unexpected response from server!', 'update-chart-error': 'Error while updating charts!', @@ -138,6 +140,7 @@ const jsonData = { 'delete-test': 'Test deleted successfully!', 'delete-message': 'Message deleted successfully!', 'delete-entity-success': 'Entity deleted successfully!', + 'test-connection-success': 'Connection tested successfully!', }, 'form-error-messages': { 'empty-email': 'Email is required.', diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/tailwind.css b/openmetadata-ui/src/main/resources/ui/src/styles/tailwind.css index 1c12427a390..0fc3e13bc4b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/styles/tailwind.css +++ b/openmetadata-ui/src/main/resources/ui/src/styles/tailwind.css @@ -449,6 +449,10 @@ width: 450px; } + .Toastify__toast { + @apply tw-overflow-y-auto tw-max-h-80vh; + } + .Toastify__toast-body { @apply tw-items-start; } diff --git a/openmetadata-ui/src/main/resources/ui/tailwind.config.js b/openmetadata-ui/src/main/resources/ui/tailwind.config.js index 34303471416..d5a17ffe890 100644 --- a/openmetadata-ui/src/main/resources/ui/tailwind.config.js +++ b/openmetadata-ui/src/main/resources/ui/tailwind.config.js @@ -170,6 +170,7 @@ module.exports = { }, maxHeight: { 32: '8rem', + '80vh': '80vh', '90vh': '90vh', }, minHeight: {