Skip to content

Commit

Permalink
[Enterprise Search] Disable setting schedule for disabled schedules (#…
Browse files Browse the repository at this point in the history
…145557)

This disables setting a sync schedule for connectors if synchronization
is disabled.
  • Loading branch information
sphilipse authored Nov 17, 2022
1 parent baf450d commit 58cb0e4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ import {
EuiCallOut,
} from '@elastic/eui';

import { CronEditor, Frequency } from '@kbn/es-ui-shared-plugin/public';
import { i18n } from '@kbn/i18n';

import { Status } from '../../../../../../common/types/api';
import { ConnectorStatus } from '../../../../../../common/types/connectors';
import { ConnectorIndex } from '../../../../../../common/types/indices';
import { CronEditor } from '../../../../shared/cron_editor';
import { Frequency } from '../../../../shared/cron_editor/types';
import { generateEncodedPath } from '../../../../shared/encode_path_params';
import { EuiButtonTo } from '../../../../shared/react_router_helpers';
import { UnsavedChangesPrompt } from '../../../../shared/unsaved_changes_prompt';
Expand Down Expand Up @@ -163,6 +164,7 @@ export const ConnectorSchedulingComponent: React.FC = () => {
<EuiFlexItem>
<CronEditor
data-telemetry-id="entSearchContent-connector-scheduling-editSchedule"
disabled={!scheduling.enabled}
fieldToPreferredValueMap={fieldToPreferredValueMap}
cronExpression={simpleCron.expression}
frequency={simpleCron.frequency}
Expand Down

0 comments on commit 58cb0e4

Please sign in to comment.