-
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
f909477
commit ce1a701
Showing
19 changed files
with
252 additions
and
25 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
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
41 changes: 41 additions & 0 deletions
41
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,41 @@ | ||
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'; | ||
Check failure on line 9 in webpack/components/NewTemplateSync/components/ProxySettingField.js GitHub Actions / test_js (12)
|
||
|
||
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={true} | ||
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.