-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial wiring up for capture interval #1230
Merged
+421
−215
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e852661
Making a shared hydrator that calls all the hydrators we need
travjenkins 0a5daae
Starting to wire up the CaptureInterval component
travjenkins dd5f6d3
Commenting out interval stuff to work on merging
travjenkins b61ba20
Using a shared function that already exists for this
travjenkins 7c8d9d5
Removing resource as it is not consumed currently
travjenkins bbbf31f
Adding a guard to ensure we have a connector selected
travjenkins cc41feb
Adding some validation to the guard to make it a bit safer
travjenkins e70a14c
Moving some validation into a new folder for validation
travjenkins b65a5d3
Making sure we show the name on error page
travjenkins 37b1fde
Putting eventing in common place
travjenkins 0e2db98
using common value
travjenkins 19d371a
The pattern is no longer being used
travjenkins 58243a6
PR: content and comments
travjenkins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
import { | ||
FormControl, | ||
FormHelperText, | ||
InputAdornment, | ||
InputLabel, | ||
MenuItem, | ||
OutlinedInput, | ||
Select, | ||
Stack, | ||
Typography, | ||
} from '@mui/material'; | ||
import { FormattedMessage, useIntl } from 'react-intl'; | ||
|
||
const DESCRIPTION_ID = 'capture-interval-description'; | ||
const INPUT_ID = 'capture-interval-input'; | ||
const INPUT_SIZE = 'small'; | ||
interface Props { | ||
readOnly?: boolean; | ||
} | ||
|
||
function CaptureInterval({ readOnly }: Props) { | ||
const intl = useIntl(); | ||
const label = intl.formatMessage({ | ||
id: 'workflows.interval.input.label', | ||
}); | ||
|
||
// Need to check if Capture Interval is there | ||
|
||
return ( | ||
<Stack spacing={1}> | ||
<Typography variant="formSectionHeader"> | ||
<FormattedMessage id="workflows.interval.header" /> | ||
</Typography> | ||
|
||
<Typography> | ||
<FormattedMessage id="workflows.interval.message" /> | ||
</Typography> | ||
|
||
<FormControl | ||
error={false} | ||
fullWidth={false} | ||
size={INPUT_SIZE} | ||
variant="outlined" | ||
sx={{ | ||
'& .MuiFormHelperText-root.Mui-error': { | ||
whiteSpace: 'break-spaces', | ||
}, | ||
}} | ||
> | ||
<InputLabel | ||
disabled={readOnly} | ||
focused | ||
htmlFor={INPUT_ID} | ||
variant="outlined" | ||
> | ||
{label} | ||
</InputLabel> | ||
|
||
<OutlinedInput | ||
aria-describedby={DESCRIPTION_ID} | ||
disabled={readOnly} | ||
error={false} | ||
id={INPUT_ID} | ||
label={label} | ||
size={INPUT_SIZE} | ||
sx={{ borderRadius: 3 }} | ||
onChange={(event) => { | ||
console.log('change', event.target.value); | ||
}} | ||
endAdornment={ | ||
<InputAdornment position="start"> | ||
<Select | ||
disabled={readOnly} | ||
disableUnderline | ||
error={false} | ||
required | ||
size={INPUT_SIZE} | ||
variant="standard" | ||
sx={{ | ||
'maxWidth': 100, | ||
'minWidth': 100, | ||
'& .MuiSelect-select': { | ||
paddingBottom: 0.2, | ||
}, | ||
}} | ||
onChange={(event) => { | ||
console.log( | ||
'select change', | ||
event.target.value | ||
); | ||
}} | ||
> | ||
<MenuItem value="s" selected> | ||
<FormattedMessage id="workflows.interval.input.seconds" /> | ||
</MenuItem> | ||
|
||
<MenuItem value="m"> | ||
<FormattedMessage id="workflows.interval.input.minutes" /> | ||
</MenuItem> | ||
|
||
<MenuItem value="h"> | ||
<FormattedMessage id="workflows.interval.input.hours" /> | ||
</MenuItem> | ||
</Select> | ||
</InputAdornment> | ||
} | ||
/> | ||
<FormHelperText | ||
id={DESCRIPTION_ID} | ||
// error={showErrors ? !description : undefined} | ||
> | ||
errors go here | ||
</FormHelperText> | ||
</FormControl> | ||
</Stack> | ||
); | ||
} | ||
|
||
export default CaptureInterval; |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual change... grouped all hydrators into a shared spot