Skip to content

Commit

Permalink
Misc Updates (debezium#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrillin authored Jan 28, 2021
1 parent bc66822 commit f583193
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 171 deletions.
23 changes: 13 additions & 10 deletions ui/packages/ui/src/app/components/FilterInputFieldComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ const getFieldExpression = (
export const FilterInputFieldComponent: React.FunctionComponent<IFilterInputFieldComponentProps> = (
props
) => {
const FIELD_EXCLUDE = "fieldExclude";
const FIELD_INCLUDE = "fieldInclude";

const [filterField, setFilterField] = React.useState<string>(
getFieldExpression(
props.filterValues,
Expand All @@ -66,8 +69,8 @@ export const FilterInputFieldComponent: React.FunctionComponent<IFilterInputFiel

const [fieldSelected, setFieldSelected] = React.useState<string>(
props.filterValues.has(props.fieldExcludeList)
? "fieldExclude"
: "fieldInclude"
? FIELD_EXCLUDE
: FIELD_INCLUDE
);

const handleParentFilter = (val: string) => {
Expand All @@ -89,14 +92,14 @@ export const FilterInputFieldComponent: React.FunctionComponent<IFilterInputFiel
);
setFieldSelected(
props.filterValues.has(props.fieldExcludeList)
? "fieldExclude"
: "fieldInclude"
? FIELD_EXCLUDE
: FIELD_INCLUDE
);
}, [props.filterValues, props.fieldExcludeList, props.fieldIncludeList]);

React.useEffect(() => {
const formDataCopy = new Map<string, string>(props.formData);
if (fieldSelected === "fieldExclude") {
if (fieldSelected === FIELD_EXCLUDE) {
formDataCopy.delete(props.fieldIncludeList);
filterField
? formDataCopy.set(props.fieldExcludeList, filterField)
Expand All @@ -115,7 +118,7 @@ export const FilterInputFieldComponent: React.FunctionComponent<IFilterInputFiel
label={props.i18nFilterFieldLabel}
fieldId="field_filter"
helperText={
fieldSelected === "fieldExclude" ? (
fieldSelected === FIELD_EXCLUDE ? (
<Text
component={TextVariants.h4}
className="child-selection-step_info"
Expand Down Expand Up @@ -186,15 +189,15 @@ export const FilterInputFieldComponent: React.FunctionComponent<IFilterInputFiel
<FlexItem>
<ToggleGroup aria-label="Include Exclude field toggle group">
<ToggleGroupItem
buttonId="fieldInclude"
isSelected={fieldSelected === "fieldInclude"}
buttonId={FIELD_INCLUDE}
isSelected={fieldSelected === FIELD_INCLUDE}
onChange={handleParentToggle}
onClick={(e) => e.preventDefault()}
text={props.i18nInclude}
/>
<ToggleGroupItem
buttonId="fieldExclude"
isSelected={fieldSelected === "fieldExclude"}
buttonId={FIELD_EXCLUDE}
isSelected={fieldSelected === FIELD_EXCLUDE}
onChange={handleParentToggle}
onClick={(e) => e.preventDefault()}
text={props.i18nExclude}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ export const FormSelectComponent = (props: IFormSelectComponentProps) => {
} = props;

const [isOpen, setOpen] = React.useState<boolean>(false)
const [selected, setSelected] = React.useState<boolean>(false)
const [field] = useField(props);

const onToggle = (open: boolean) => {
setOpen(open)
};

const clearSelection = () => {
setSelected(false)
setOpen(false)
};

Expand All @@ -54,7 +52,6 @@ export const FormSelectComponent = (props: IFormSelectComponentProps) => {
clearSelection();
}
else {
setSelected(selection)
setOpen(false)
setFieldValue(field.name, selection);
propertyChange(field.name, selection);
Expand Down
156 changes: 78 additions & 78 deletions ui/packages/ui/src/app/i18n/locales/translations.en.json
Original file line number Diff line number Diff line change
@@ -1,106 +1,106 @@
{
"app": {
"addDefinition": "+ Add definition",
"addDefinitionTooltip": "Add another definition row",
"additionalProperties": "Additional properties",
"advancedMappingPropertiesText": "Advanced mapping properties",
"advancedPropertiesText": "Advanced Properties",
"advancedPublicationPropertiesText": "Publication",
"advancedReplicationPropertiesText": "Replication",
"apiErrorTitle": "Server API problem",
"apiErrorMsg": "A problem was encountered interacting with the server. See below for more information (if available). If the problem persists, you may try reloading or report the problem to an admin.",
"applicationErrorTitle": "Application error",
"applicationErrorMsg": "An application error has occurred",
"apply": "Apply",
"back": "Back",
"basicPropertiesText": "Basic Properties",
"engineProperties": "Engine properties",
"heartbeatProperties": "Heartbeat properties",
"mappingPropertiesText": "Mapping properties",
"snapshotPropertiesText": "Snapshot properties",
"pause": "Pause",
"resume":"Resume",
"restart":"Restart",
"delete": "Delete",
"name": "Name",
"reviewMessage": "Review the properties to be used for creation of connector '{{connectorName}}'. Click 'Finish' to create the connector.",
"reviewTitle": "Review Connector Properties",
"status": "Status",
"tasks": "Tasks",
"resolvePropertyErrorsMsg": "Resolve property errors, then click Validate",
"resolvePropertySucessMsg": "All required configuration is complete. If desired, you can proceed to",
"validationSucessMsg": "The validation was successful",
"unknownError": "Unknown error - please consult your administrator",
"connectorType": "Connector type",
"properties": "Properties",
"filterConfiguration": "Filter definition",
"dataOptions": "Data options",
"runtimeOptions": "Runtime options",
"review": "Review",
"connectorFailedMsg": "Creation of the connector failed!",
"duplicateConnectorErrorMsg": "Name already in use - please choose a different name.",
"connectorName": "Connector name",
"finish": "Finish",
"optionalMsg": "This step is optional",
"stay": "Stay",
"leave": "Leave",
"cancel": "Cancel",
"cancelWarningMsg": "All inputs will be lost. Are you sure you want to leave?",
"exitWizard": "Exit wizard",
"clear": "Clear",
"clearFilterConfMsg": "This operation will clear all filtering expressions. \nAre you sure you want to proceed?",
"clearFilters": "Clear filters",
"clearFilterText": "You can include all {{parent}} and {{child}} by clicking",
"connectorDeletedSuccess": "Connector deleted successfully!",
"connectorDeletionFailed": "Connector deletion failed!",
"cancel": "Cancel",
"deleteWarningMsg": "The connector will be deleted, and cannot be undone. Proceed?",
"deleteConnector": "Delete connector",
"createAConnector": "Create a connector",
"noConnectors": "No connectors",
"connectorEmptyStateMsg": "Please click 'Create a connector' to create a new connector.",
"connectorFailedMsg": "Creation of the connector failed!",
"connectorName": "Connector name",
"connectorPageHeadingText": "This list shows all connectors that have been created. You can create a new connector by clicking the 'Create a connector' button.",
"connectorPausedSuccess": "Connector paused successfully!",
"connectorPauseFailed": "Connector pause failed!",
"connectorPauseWarningMsg": "Are you sure want to pause?",
"connectorRestartFailed": "Connector restart failed!",
"connectorRestartSuccess": "Connector restarted successfully!",
"connectorRestartWarningMsg": "Are you sure want to restart?",
"connectorResumedSuccess": "Connector resumed successfully!",
"connectorResumeFailed": "Connector resume failed!",
"connectorResumeWarningMsg": "Are you sure want to resume?",
"connectors": "Connectors",
"filterFieldInfoMsg": "A comma-separated list of regular expressions for {{field}} filtering (e.g {{sampleVal}}1,{{sampleVal}}2). Click for more information about regular expressions:",
"filterFieldLabel": "{{field}} filter",
"connectorType": "Connector type",
"createAConnector": "Create a connector",
"createConnector": "Create connector",
"dataOptions": "Data options",
"delete": "Delete",
"deleteConnector": "Delete connector",
"deleteWarningMsg": "The connector will be deleted, and cannot be undone. Proceed?",
"details": "Details:",
"duplicateConnectorErrorMsg": "Name already in use - please choose a different name.",
"engineProperties": "Engine properties",
"exclude": "Exclude",
"exitWizard": "Exit wizard",
"filterConfiguration": "Filter definition",
"filterExcludeFieldLabel": "{{field}} exclude filter",
"filterExpressionResultText": "{{name}}(s) available for change capture. You can enter regular expressions to filter.",
"filterFieldHelperText": "{{field}}(s) matching the regular expression filter(s) will be excluded.",
"filterFieldInfoMsg": "A comma-separated list of regular expressions for {{field}} filtering (e.g {{sampleVal}}1,{{sampleVal}}2). Click for more information about regular expressions:",
"filterFieldLabel": "{{field}} filter",
"filterPageHeadingText": "Select {{child}}s for change capture by entering comma-separated lists of regular expressions for {{parent}}s and {{child}}s.",
"finish": "Finish",
"heartbeatProperties": "Heartbeat properties",
"hideDetails": "Hide details",
"include": "Include",
"exclude": "Exclude",
"apply": "Apply",
"clearFilters": "Clear filters",
"invalidFilterExpText": "The expression(s) for {{name}} filtering are invalid, please correct and try again.",
"invalidFilters": "Invalid filter(s)",
"invalidFilterText": "The expression(s) for {{name}} filtering are invalid.",
"noMatchingFilterExpMsg": "No matching {{name}} for the specified filter(s)",
"leave": "Leave",
"mappingPropertiesText": "Mapping properties",
"matchingFilterExpMsg": "matching {{name}}(s) for change capture",
"clearFilterText": "You can include all {{parent}} and {{child}} by clicking",
"filterExpressionResultText": "{{name}}(s) available for change capture. You can enter regular expressions to filter.",
"clearFilterConfMsg": "This operation will clear all filtering expressions. \nAre you sure you want to proceed?",
"clear": "Clear",
"validate": "Validate",
"name": "Name",
"next": "Next",
"back": "Back",
"taskStatusDetail": "Task Status Detail",
"task": "Task",
"details": "Details:",
"connectorPageHeadingText": "This list shows all connectors that have been created. You can create a new connector by clicking the 'Create a connector' button.",
"noConnectors": "No connectors",
"noDetailsAvailable": "No details available",
"noMatchingFilterExpMsg": "No matching {{name}} for the specified filter(s)",
"noMatchingTables": "No matching {{name}}",
"optionalMsg": "This step is optional",
"pageNotFound": "page not found",
"pageNotFoundMsg": "This page couldn't be found. If you think this is a bug, please report the issue.",
"takeBackToHome": "Take back to home",
"noMatchingTables": "No matching {{name}}",
"invalidFilters": "Invalid filter(s)",
"invalidFilterExpText": "The expression(s) for {{name}} filtering are invalid, please correct and try again.",
"addDefinition": "+ Add definition",
"addDefinitionTooltip": "Add another definition row",
"removeDefinitionTooltip": "Remove this definition row",
"propertyValidationError": "Property validation error",
"pause": "Pause",
"pauseConnector": "Pause connector",
"resumeConnector": "Resume connector",
"restartConnector": "Restart connector",
"connectorPauseWarningMsg": "Are you sure want to pause?",
"connectorResumeWarningMsg": "Are you sure want to resume?",
"connectorRestartWarningMsg": "Are you sure want to restart?",
"connectorPausedSuccess": "Connector paused successfully!",
"connectorPauseFailed": "Connector pause failed!",
"connectorResumedSuccess": "Connector resumed successfully!",
"connectorResumeFailed": "Connector resume failed!",
"connectorRestartSuccess": "Connector restarted successfully!",
"connectorRestartFailed": "Connector restart failed!",
"properties": "Properties",
"propertyValidationError": "Property validation error",
"reloadPage": "Reload page",
"removeDefinitionTooltip": "Remove this definition row",
"reportIssue": "Report the issue",
"resolvePropertyErrorsMsg": "Resolve property errors, then click Validate",
"resolvePropertySucessMsg": "All required configuration is complete. If desired, you can proceed to",
"resume":"Resume",
"resumeConnector": "Resume connector",
"restart":"Restart",
"restartConnector": "Restart connector",
"review": "Review",
"reviewMessage": "Review the properties to be used for creation of connector '{{connectorName}}'. Click 'Finish' to create the connector.",
"reviewTitle": "Review Connector Properties",
"runtimeOptions": "Runtime options",
"showDetails": "Show details",
"hideDetails": "Hide details",
"noDetailsAvailable": "No details available",
"apiErrorTitle": "Server API problem",
"apiErrorMsg": "A problem was encountered interacting with the server. See below for more information (if available). If the problem persists, you may try reloading or report the problem to an admin.",
"applicationErrorTitle": "Application error",
"applicationErrorMsg": "An application error has occurred",
"createConnector": "Create connector"
"snapshotPropertiesText": "Snapshot properties",
"status": "Status",
"stay": "Stay",
"takeBackToHome": "Take back to home",
"task": "Task",
"tasks": "Tasks",
"taskStatusDetail": "Task Status Detail",
"unknownError": "Unknown error - please consult your administrator",
"validate": "Validate",
"validationSucessMsg": "The validation was successful"
}
}
Loading

0 comments on commit f583193

Please sign in to comment.