-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #37900 - Allow syncing templates through HTTP proxy
- Loading branch information
1 parent
de2c8ea
commit 69823ba
Showing
16 changed files
with
372 additions
and
28 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
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
44 changes: 44 additions & 0 deletions
44
webpack/components/NewTemplateSync/components/ProxySettingField.js
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,44 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { get } from 'lodash'; | ||
|
||
import { FieldLevelHelp } from 'patternfly-react'; | ||
import RenderField from './TextButtonField/RenderField'; | ||
import ButtonTooltip from './ButtonTooltip'; | ||
|
||
import { | ||
tooltipContent, | ||
label, | ||
} from './NewTemplateSyncForm/NewTemplateSyncFormHelpers'; | ||
|
||
const ProxySettingField = ({ setting, resetField, field, form, fieldName }) => ( | ||
<RenderField | ||
label={label(setting)} | ||
fieldSelector={_ => 'select'} | ||
tooltipHelp={<FieldLevelHelp content={tooltipContent(setting)} />} | ||
buttonAttrs={{ | ||
buttonText: <ButtonTooltip tooltipId={fieldName} />, | ||
buttonAction: () => | ||
resetField(fieldName, setting.value)(form.setFieldValue), | ||
}} | ||
blank={{}} | ||
item={setting} | ||
disabled={false} | ||
fieldRequired | ||
meta={{ | ||
touched: get(form.touched, fieldName), | ||
error: get(form.errors, fieldName), | ||
}} | ||
input={field} | ||
/> | ||
); | ||
|
||
ProxySettingField.propTypes = { | ||
setting: PropTypes.object.isRequired, | ||
resetField: PropTypes.func.isRequired, | ||
field: PropTypes.object.isRequired, | ||
form: PropTypes.object.isRequired, | ||
fieldName: PropTypes.string.isRequired, | ||
}; | ||
|
||
export default ProxySettingField; |
Oops, something went wrong.