Skip to content

Commit

Permalink
fix: update scheduler type for manual interval (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitd94 authored and macintushar committed Apr 20, 2024
1 parent d7f1db0 commit 395d4bc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ui/src/views/Activate/Syncs/EditSync/EditSync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const EditSync = (): JSX.Element | null => {
sync_mode: 'full_refresh',
sync_interval: 0,
sync_interval_unit: 'minutes',
schedule_type: 'automated',
schedule_type: 'interval',
},
onSubmit: async (data) => {
setIsEditLoading(true);
Expand Down Expand Up @@ -147,7 +147,7 @@ const EditSync = (): JSX.Element | null => {
sync_interval: syncData?.sync_interval ?? 0,
sync_interval_unit: syncData?.sync_interval_unit ?? 'minutes',
sync_mode: syncData?.sync_mode ?? 'full_refresh',
schedule_type: syncData?.schedule_type ?? 'automated',
schedule_type: syncData?.schedule_type ?? 'interval',
});

if (Array.isArray(syncFetchResponse.data.attributes.configuration)) {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/views/Activate/Syncs/EditSync/ScheduleForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const ScheduleForm = ({ formik, isEdit }: ScheduleFormProps) => {
</Box>
</Radio>
<Radio
value='automated'
value='interval'
display='flex'
alignItems='flex-start'
backgroundColor='#fff'
Expand All @@ -65,7 +65,7 @@ const ScheduleForm = ({ formik, isEdit }: ScheduleFormProps) => {
</RadioGroup>
</Box>
<Box>
{formik.values.schedule_type === 'automated' ? (
{formik.values.schedule_type === 'interval' ? (
<>
<Text mb={4} fontWeight='semibold' size='sm'>
Schedule Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const FinaliseSync = (): JSX.Element => {
sync_mode: 'full_refresh',
sync_interval: 0,
sync_interval_unit: 'minutes',
schedule_type: 'automated',
schedule_type: 'interval',
},
onSubmit: async (data) => {
setIsLoading(true);
Expand Down Expand Up @@ -134,7 +134,7 @@ const FinaliseSync = (): JSX.Element => {
</Box>
</Radio>
<Radio
value='automated'
value='interval'
display='flex'
alignItems='flex-start'
backgroundColor='gray.100'
Expand All @@ -153,7 +153,7 @@ const FinaliseSync = (): JSX.Element => {
</RadioGroup>
</Box>
<Box>
{formik.values.schedule_type === 'automated' ? (
{formik.values.schedule_type === 'interval' ? (
<>
<Text mb={4} fontWeight='600' size='sm'>
Schedule Configuration
Expand Down
6 changes: 3 additions & 3 deletions ui/src/views/Activate/Syncs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export type ConfigSync = {
source_id: string;
destination_id: string;
model_id: string;
schedule_type: 'automated';
schedule_type: 'interval';
configuration: FieldMapType[];
stream_name: string;
};
Expand All @@ -89,7 +89,7 @@ export type CreateSyncResponse = {
configuration: Record<string, string>;
destination_id: number;
model_id: number;
schedule_type: 'automated';
schedule_type: 'interval';
source_id: string;
status: string;
stream_name: string;
Expand Down Expand Up @@ -127,7 +127,7 @@ export type FinalizeSyncFormFields = {
sync_mode: 'full_refresh';
sync_interval: number;
sync_interval_unit: 'minutes';
schedule_type: 'automated';
schedule_type: 'interval';
};

export type SyncRunsResponse = {
Expand Down

0 comments on commit 395d4bc

Please sign in to comment.