-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #32045 - Add start-end date pickers to job wizard
- Loading branch information
Showing
13 changed files
with
437 additions
and
77 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const jobTemplate = { | ||
export const jobTemplate = { | ||
id: 178, | ||
name: 'Run Command - Ansible Default', | ||
template: | ||
|
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 |
---|---|---|
@@ -1,25 +1,28 @@ | ||
import React, { useState } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { FormGroup, Radio } from '@patternfly/react-core'; | ||
import { translate as __ } from 'foremanReact/common/I18n'; | ||
|
||
export const ScheduleType = () => { | ||
const [isFuture, setIsFuture] = useState(false); | ||
return ( | ||
<FormGroup label={__('Schedule type')} fieldId="schedule-type"> | ||
<Radio | ||
isChecked={!isFuture} | ||
name="schedule-type" | ||
onChange={() => setIsFuture(false)} | ||
id="schedule-type-now" | ||
label={__('Execute now')} | ||
/> | ||
<Radio | ||
isChecked={isFuture} | ||
name="schedule-type" | ||
onChange={() => setIsFuture(true)} | ||
id="schedule-type-future" | ||
label={__('Schedule for future execution')} | ||
/> | ||
</FormGroup> | ||
); | ||
export const ScheduleType = ({ isFuture, setIsFuture }) => ( | ||
<FormGroup label={__('Schedule type')} fieldId="schedule-type"> | ||
<Radio | ||
isChecked={!isFuture} | ||
name="schedule-type" | ||
onChange={() => setIsFuture(false)} | ||
id="schedule-type-now" | ||
label={__('Execute now')} | ||
/> | ||
<Radio | ||
isChecked={isFuture} | ||
name="schedule-type" | ||
onChange={() => setIsFuture(true)} | ||
id="schedule-type-future" | ||
label={__('Schedule for future execution')} | ||
/> | ||
</FormGroup> | ||
); | ||
|
||
ScheduleType.propTypes = { | ||
isFuture: PropTypes.bool.isRequired, | ||
setIsFuture: PropTypes.func.isRequired, | ||
}; |
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.