diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataInsightSettings.spec.ts b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataInsightSettings.spec.ts index e769d075234..16f7c646e1c 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataInsightSettings.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataInsightSettings.spec.ts @@ -122,7 +122,8 @@ describe( }); if (Cypress.env('isOss')) { - it('Run application', () => { + // We are running it for DataInsight page tests + it.skip('Run application', () => { interceptURL( 'GET', '/api/v1/apps/name/DataInsightsApplication?fields=*', diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AppContainer/AppContainer.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AppContainer/AppContainer.tsx index b1b694b2690..4920f110bc3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AppContainer/AppContainer.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AppContainer/AppContainer.tsx @@ -76,6 +76,7 @@ const AppContainer = () => { { - if (appData.name === 'DataInsightsReportApplication') { - return ['week']; - } else if (appData.appType === AppType.External) { - return ['day']; - } - - return pipelineSchedules - ? getScheduleOptionsFromSchedules(pipelineSchedules) - : undefined; + return applicationsClassBase.getScheduleOptionsForApp( + appData.name, + appData.appType, + pipelineSchedules + ); }, [appData.name, appData.appType, pipelineSchedules]); useEffect(() => { diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AppInstall/AppInstall.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AppInstall/AppInstall.component.tsx index ac996a2e9fe..60eabf8ce79 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AppInstall/AppInstall.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AppInstall/AppInstall.component.tsx @@ -26,7 +26,10 @@ import Loader from '../../components/common/Loader/Loader'; import { TestSuiteIngestionDataType } from '../../components/DataQuality/AddDataQualityTest/AddDataQualityTest.interface'; import TestSuiteScheduler from '../../components/DataQuality/AddDataQualityTest/components/TestSuiteScheduler'; import PageLayoutV1 from '../../components/PageLayoutV1/PageLayoutV1'; -import applicationSchemaClassBase from '../../components/Settings/Applications/AppDetails/ApplicationsClassBase'; +import { + default as applicationSchemaClassBase, + default as applicationsClassBase, +} from '../../components/Settings/Applications/AppDetails/ApplicationsClassBase'; import AppInstallVerifyCard from '../../components/Settings/Applications/AppInstallVerifyCard/AppInstallVerifyCard.component'; import IngestionStepper from '../../components/Settings/Services/Ingestion/IngestionStepper/IngestionStepper.component'; import { STEPS_FOR_APP_INSTALL } from '../../constants/Applications.constant'; @@ -50,7 +53,6 @@ import { getMarketPlaceAppDetailsPath, getSettingPath, } from '../../utils/RouterUtils'; -import { getScheduleOptionsFromSchedules } from '../../utils/ScheduleUtils'; import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils'; import './app-install.less'; @@ -81,16 +83,16 @@ const AppInstall = () => { ); const { initialOptions, initialValue } = useMemo(() => { - let initialOptions; - - if (appData?.name === 'DataInsightsReportApplication') { - initialOptions = ['week']; - } else if (appData?.appType === AppType.External) { - initialOptions = ['day']; - } else if (pipelineSchedules && !isEmpty(pipelineSchedules)) { - initialOptions = getScheduleOptionsFromSchedules(pipelineSchedules); + if (!appData) { + return {}; } + const initialOptions = applicationsClassBase.getScheduleOptionsForApp( + appData?.name, + appData?.appType, + pipelineSchedules + ); + return { initialOptions, initialValue: {