forked from debezium/debezium-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display error msg on invalid fields (debezium#294)
- Loading branch information
Showing
9 changed files
with
145 additions
and
63 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
ui/packages/ui/src/app/components/ConnectionPropertiesError.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { PropertyValidationResult } from '@debezium/ui-models/dist/js/ui.model'; | ||
import React from 'react'; | ||
|
||
export interface IConnectionPropertiesErrorProps{ | ||
connectionPropsMsg: PropertyValidationResult[]; | ||
validationErrorMsg: string; | ||
} | ||
|
||
export const ConnectionPropertiesError : React.FunctionComponent<IConnectionPropertiesErrorProps> = (props)=>{ | ||
if (props.connectionPropsMsg.length !== 0) { | ||
return ( | ||
<ul> | ||
{props.connectionPropsMsg.map((item, index) => ( | ||
<li key={index}> | ||
{item.property === 'Generic' ? `${item.displayName}: ${item.message}` : props.validationErrorMsg} | ||
</li> | ||
))} | ||
</ul> | ||
); | ||
} else { | ||
return <div>{props.validationErrorMsg}</div>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.