Skip to content

Commit 7954399

Browse files
committed
Add i18n for disabling the connection, limit supported preferences
1 parent 06e1717 commit 7954399

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

airbyte-webapp/src/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
"connectionForm.nonBreakingChangesPreference.label": "Non-breaking schema updates detected*",
154154
"connectionForm.nonBreakingChangesPreference.message": "Set how Airbyte handles syncs when it detects a non-breaking schema change in the source",
155155
"connectionForm.nonBreakingChangesPreference.ignore": "Ignore",
156+
"connectionForm.nonBreakingChangesPreference.disable": "Disable connection",
156157
"connectionForm.schemaChangesBackdrop.message": "Please review the schema updates before making changes to the connection",
157158

158159
"connectionForm.modal.destinationNamespace.title": "Destination namespace",

airbyte-webapp/src/views/Connection/ConnectionForm/components/NonBreakingChangesPreferenceField.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ import { useConnectionFormService } from "hooks/services/ConnectionForm/Connecti
1111

1212
import styles from "./NonBreakingChangesPreferenceField.module.scss";
1313

14+
const SUPPORTED_PREFERENCES = [NonBreakingChangesPreference.ignore, NonBreakingChangesPreference.disable];
15+
1416
export const NonBreakingChangesPreferenceField: React.FC<FieldProps<string>> = ({ field, form }) => {
1517
const { formatMessage } = useIntl();
1618

1719
const preferenceOptions = useMemo(() => {
18-
const values = Object.values(NonBreakingChangesPreference);
19-
return values.map((value) => ({
20+
return SUPPORTED_PREFERENCES.map((value) => ({
2021
value,
2122
label: formatMessage({ id: `connectionForm.nonBreakingChangesPreference.${value}` }),
2223
testId: `nonBreakingChangesPreference-${value}`,

0 commit comments

Comments
 (0)