mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-19 21:02:19 +00:00
fix(ui): schedule option for DataInsightReport Application (#14966)
This commit is contained in:
parent
fb3e6e88da
commit
930bd99dac
@ -60,11 +60,6 @@ const AppInstall = () => {
|
|||||||
const [appConfiguration, setAppConfiguration] = useState();
|
const [appConfiguration, setAppConfiguration] = useState();
|
||||||
const [jsonSchema, setJsonSchema] = useState<RJSFSchema>();
|
const [jsonSchema, setJsonSchema] = useState<RJSFSchema>();
|
||||||
|
|
||||||
const isExternalApp = useMemo(
|
|
||||||
() => appData?.appType === AppType.External,
|
|
||||||
[appData]
|
|
||||||
);
|
|
||||||
|
|
||||||
const stepperList = useMemo(
|
const stepperList = useMemo(
|
||||||
() =>
|
() =>
|
||||||
!appData?.allowConfiguration
|
!appData?.allowConfiguration
|
||||||
@ -126,6 +121,16 @@ const AppInstall = () => {
|
|||||||
setActiveServiceStep(3);
|
setActiveServiceStep(3);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const initialOptions = useMemo(() => {
|
||||||
|
if (appData?.name === 'DataInsightsReportApplication') {
|
||||||
|
return ['Week'];
|
||||||
|
} else if (appData?.appType === AppType.External) {
|
||||||
|
return ['Day'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
}, [appData?.name, appData?.appType]);
|
||||||
|
|
||||||
const RenderSelectedTab = useCallback(() => {
|
const RenderSelectedTab = useCallback(() => {
|
||||||
if (!appData || !jsonSchema) {
|
if (!appData || !jsonSchema) {
|
||||||
return <></>;
|
return <></>;
|
||||||
@ -170,7 +175,7 @@ const AppInstall = () => {
|
|||||||
<Typography.Title level={5}>{t('label.schedule')}</Typography.Title>
|
<Typography.Title level={5}>{t('label.schedule')}</Typography.Title>
|
||||||
<TestSuiteScheduler
|
<TestSuiteScheduler
|
||||||
isQuartzCron
|
isQuartzCron
|
||||||
includePeriodOptions={isExternalApp ? ['Day'] : undefined}
|
includePeriodOptions={initialOptions}
|
||||||
initialData={getIngestionFrequency(PipelineType.Application)}
|
initialData={getIngestionFrequency(PipelineType.Application)}
|
||||||
onCancel={() =>
|
onCancel={() =>
|
||||||
setActiveServiceStep(appData.allowConfiguration ? 2 : 1)
|
setActiveServiceStep(appData.allowConfiguration ? 2 : 1)
|
||||||
@ -182,7 +187,7 @@ const AppInstall = () => {
|
|||||||
default:
|
default:
|
||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
}, [activeServiceStep, appData, jsonSchema, isExternalApp]);
|
}, [activeServiceStep, appData, jsonSchema, initialOptions]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchAppDetails();
|
fetchAppDetails();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user