Skip to content

Commit

Permalink
updated controlled field for cron string
Browse files Browse the repository at this point in the history
  • Loading branch information
evisdrenova committed Nov 9, 2023
1 parent 1785d6f commit 1fa4597
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion frontend/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"caughtErrorsIgnorePattern": "^_"
}
],
"no-console": ["error", { "allow": ["error"] }],
//"no-console": ["error", { "allow": ["error"] }],
"@typescript-eslint/no-explicit-any": "error"
},
"plugins": ["@typescript-eslint"],
Expand Down
15 changes: 7 additions & 8 deletions frontend/app/new/job/define/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function Page({ searchParams }: PageProps): ReactElement {
`${sessionPrefix}-new-job-define`,
{
jobName: '',
cronSchedule: '',
cronSchedule: '* * * * *',
initiateJobRun: false,
}
);
Expand Down Expand Up @@ -84,20 +84,19 @@ export default function Page({ searchParams }: PageProps): ReactElement {
</FormItem>
)}
/>

<FormField
control={form.control}
name="cronSchedule"
render={() => (
render={({ field }) => (
<FormItem>
<FormLabel>Schedule</FormLabel>
<FormControl>
{/* <Input placeholder="Cron Schedule" {...field} /> */}
<Neocron />
<Neocron
defaultValue={field.value}
setCronString={field.onChange}
/>
</FormControl>
<FormDescription>
The schedule to run the job against if not a oneoff.
</FormDescription>
<FormDescription>The job schedule</FormDescription>
<FormMessage />
</FormItem>
)}
Expand Down
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"cron-validate": "^1.4.5",
"date-fns": "^2.30.0",
"nanoid": "^5.0.3",
"neocron": "^0.3.3",
"neocron": "^0.3.4",
"next": "^14.0.1",
"next-auth": "^4.24.4",
"next-themes": "^0.2.1",
Expand Down

0 comments on commit 1fa4597

Please sign in to comment.