Skip to content

Commit

Permalink
fix(settings): Resolved an issue where updated cron schedules were no…
Browse files Browse the repository at this point in the history
…t visible on the UI until the application was reloaded
  • Loading branch information
jorenn92 committed Jan 26, 2024
1 parent 496401f commit 87a2091
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ui/src/components/Settings/Jobs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SaveIcon } from '@heroicons/react/solid'
import { useCallback, useContext, useEffect, useRef, useState } from 'react'
import { useContext, useEffect, useRef, useState } from 'react'
import SettingsContext from '../../../contexts/settings-context'
import { PostApiHandler } from '../../../utils/ApiHandler'
import Alert from '../../Common/Alert'
Expand Down Expand Up @@ -42,6 +42,12 @@ const JobSettings = () => {
if (Boolean(resp.code)) {
setError(false)
setChanged(true)

// set context values
settingsCtx.settings.rules_handler_job_cron =
payload.rules_handler_job_cron
settingsCtx.settings.collection_handler_job_cron =
payload.collection_handler_job_cron
} else {
setError(true)
setErrorMessage(resp.message.length > 0 ? resp.message : '')
Expand Down

0 comments on commit 87a2091

Please sign in to comment.