diff options
Diffstat (limited to 'webapp/components')
3 files changed, 8 insertions, 18 deletions
diff --git a/webapp/components/integrations/components/add_command.jsx b/webapp/components/integrations/components/add_command.jsx index d71fb7c3f..e01358aa7 100644 --- a/webapp/components/integrations/components/add_command.jsx +++ b/webapp/components/integrations/components/add_command.jsx @@ -166,7 +166,7 @@ export default class AddCommand extends React.Component { AsyncClient.addCommand( command, (data) => { - browserHistory.push('/' + this.props.team.name + '/integrations/confirm?type=commands&id=' + data.token); + browserHistory.push('/' + this.props.team.name + '/integrations/confirm?type=commands&id=' + data.id); }, (err) => { this.setState({ diff --git a/webapp/components/integrations/components/add_outgoing_webhook.jsx b/webapp/components/integrations/components/add_outgoing_webhook.jsx index bf0d327ef..c3d9b0933 100644 --- a/webapp/components/integrations/components/add_outgoing_webhook.jsx +++ b/webapp/components/integrations/components/add_outgoing_webhook.jsx @@ -120,7 +120,7 @@ export default class AddOutgoingWebhook extends React.Component { AsyncClient.addOutgoingHook( hook, (data) => { - browserHistory.push('/' + this.props.team.name + '/integrations/confirm?type=outgoing_webhooks&id=' + data.token); + browserHistory.push('/' + this.props.team.name + '/integrations/confirm?type=outgoing_webhooks&id=' + data.id); }, (err) => { this.setState({ diff --git a/webapp/components/integrations/components/confirm_integration.jsx b/webapp/components/integrations/components/confirm_integration.jsx index bb26a9a8a..b9274f2e4 100644 --- a/webapp/components/integrations/components/confirm_integration.jsx +++ b/webapp/components/integrations/components/confirm_integration.jsx @@ -5,8 +5,7 @@ import React from 'react'; import BackstageHeader from 'components/backstage/components/backstage_header.jsx'; import {FormattedMessage, FormattedHTMLMessage} from 'react-intl'; -import {browserHistory, Link} from 'react-router/es6'; -import SpinnerButton from 'components/spinner_button.jsx'; +import {Link} from 'react-router/es6'; import UserStore from 'stores/user_store.jsx'; import IntegrationStore from 'stores/integration_store.jsx'; @@ -24,8 +23,6 @@ export default class ConfirmIntegration extends React.Component { constructor(props) { super(props); - this.handleDone = this.handleDone.bind(this); - this.handleIntegrationChange = this.handleIntegrationChange.bind(this); const userId = UserStore.getCurrentId(); @@ -55,13 +52,6 @@ export default class ConfirmIntegration extends React.Component { }); } - handleDone() { - browserHistory.push('/' + this.props.team.name + '/integrations/' + this.state.type); - this.setState({ - id: '' - }); - } - render() { let headerText = null; let helpText = null; @@ -87,7 +77,7 @@ export default class ConfirmIntegration extends React.Component { id='add_command.token' defaultMessage='<b>Token</b>: {token}' values={{ - token: this.state.id + token: IntegrationStore.getCommand(this.props.team.id, this.state.id).token }} /> </p> @@ -139,7 +129,7 @@ export default class ConfirmIntegration extends React.Component { id='add_outgoing_webhook.token' defaultMessage='<b>Token</b>: {token}' values={{ - token: this.state.id + token: IntegrationStore.getOutgoingWebhook(this.props.team.id, this.state.id).token }} /> </p> @@ -233,16 +223,16 @@ export default class ConfirmIntegration extends React.Component { {helpText} {tokenText} <div className='backstage-form__footer'> - <SpinnerButton + <Link className='btn btn-primary' type='submit' - onClick={this.handleDone} + to={'/' + this.props.team.name + '/integrations/' + this.state.type} > <FormattedMessage id='integrations.done' defaultMessage='Done' /> - </SpinnerButton> + </Link> </div> </div> </div> |