-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validate event sources form and enable create button on yaml form
fix unit tests fix lint error fix unit tests
- Loading branch information
Showing
10 changed files
with
57 additions
and
33 deletions.
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
31 changes: 18 additions & 13 deletions
31
frontend/packages/knative-plugin/src/components/add/event-sources/CronJobSection.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 |
---|---|---|
@@ -1,19 +1,24 @@ | ||
import * as React from 'react'; | ||
import { useFormikContext } from 'formik'; | ||
import { TextInputTypes } from '@patternfly/react-core'; | ||
import { InputField } from '@console/shared'; | ||
import { InputField, useFormikValidationFix } from '@console/shared'; | ||
import FormSection from '@console/dev-console/src/components/import/section/FormSection'; | ||
|
||
const CronJobSection: React.FC = () => ( | ||
<FormSection title="CronJobSource" extraMargin> | ||
<InputField type={TextInputTypes.text} name="data.cronjobsource.data" label="Data" /> | ||
<InputField | ||
type={TextInputTypes.text} | ||
name="data.cronjobsource.schedule" | ||
label="Schedule" | ||
helpText="Schedule is described using the unix-cron string format (* * * * *)" | ||
required | ||
/> | ||
</FormSection> | ||
); | ||
const CronJobSection: React.FC = () => { | ||
const { values } = useFormikContext(); | ||
useFormikValidationFix(values); | ||
return ( | ||
<FormSection title="CronJobSource" extraMargin> | ||
<InputField type={TextInputTypes.text} name="data.cronjobsource.data" label="Data" /> | ||
<InputField | ||
type={TextInputTypes.text} | ||
name="data.cronjobsource.schedule" | ||
label="Schedule" | ||
helpText="Schedule is described using the unix-cron string format (* * * * *)" | ||
required | ||
/> | ||
</FormSection> | ||
); | ||
}; | ||
|
||
export default CronJobSection; |
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
5 changes: 4 additions & 1 deletion
5
frontend/packages/knative-plugin/src/components/add/event-sources/KafkaSourceSection.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
31 changes: 18 additions & 13 deletions
31
frontend/packages/knative-plugin/src/components/add/event-sources/PingSourceSection.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 |
---|---|---|
@@ -1,19 +1,24 @@ | ||
import * as React from 'react'; | ||
import { useFormikContext } from 'formik'; | ||
import { TextInputTypes } from '@patternfly/react-core'; | ||
import { InputField } from '@console/shared'; | ||
import { InputField, useFormikValidationFix } from '@console/shared'; | ||
import FormSection from '@console/dev-console/src/components/import/section/FormSection'; | ||
|
||
const PingSourceSection: React.FC = () => ( | ||
<FormSection title="PingSource" extraMargin> | ||
<InputField type={TextInputTypes.text} name="data.pingsource.data" label="Data" /> | ||
<InputField | ||
type={TextInputTypes.text} | ||
name="data.pingsource.schedule" | ||
label="Schedule" | ||
helpText="Schedule is described using the unix-cron string format (* * * * *)" | ||
required | ||
/> | ||
</FormSection> | ||
); | ||
const PingSourceSection: React.FC = () => { | ||
const { values } = useFormikContext(); | ||
useFormikValidationFix(values); | ||
return ( | ||
<FormSection title="PingSource" extraMargin> | ||
<InputField type={TextInputTypes.text} name="data.pingsource.data" label="Data" /> | ||
<InputField | ||
type={TextInputTypes.text} | ||
name="data.pingsource.schedule" | ||
label="Schedule" | ||
helpText="Schedule is described using the unix-cron string format (* * * * *)" | ||
required | ||
/> | ||
</FormSection> | ||
); | ||
}; | ||
|
||
export default PingSourceSection; |
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