diff --git a/src/core/components/execute.jsx b/src/core/components/execute.jsx index 04765e91b9f..e6b3e1b0bed 100644 --- a/src/core/components/execute.jsx +++ b/src/core/components/execute.jsx @@ -11,7 +11,8 @@ export default class Execute extends Component { method: PropTypes.string.isRequired, oas3Selectors: PropTypes.object.isRequired, oas3Actions: PropTypes.object.isRequired, - onExecute: PropTypes.func + onExecute: PropTypes.func, + disabled: PropTypes.bool } handleValidateParameters = () => { @@ -24,7 +25,7 @@ export default class Execute extends Component { let { path, method, specSelectors, oas3Selectors, oas3Actions } = this.props let validationErrors = { missingBodyValue: false, - missingRequiredKeys: [] + missingRequiredKeys: [] } // context: reset errors, then (re)validate oas3Actions.clearRequestBodyValidateError({ path, method }) @@ -92,8 +93,9 @@ export default class Execute extends Component { onChangeProducesWrapper = ( val ) => this.props.specActions.changeProducesValue([this.props.path, this.props.method], val) render(){ + const { disabled } = this.props return ( - ) diff --git a/src/core/components/operation.jsx b/src/core/components/operation.jsx index 117d8227137..5fd8dc1661f 100644 --- a/src/core/components/operation.jsx +++ b/src/core/components/operation.jsx @@ -198,7 +198,8 @@ export default class Operation extends PureComponent { oas3Actions={ oas3Actions } path={ path } method={ method } - onExecute={ onExecute } /> + onExecute={ onExecute } + disabled={executeInProgress}/> } { (!tryItOutEnabled || !response || !allowTryItOut) ? null :