Skip to content

Commit

Permalink
feat(deploy): display failure notification for 10 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac authored and philippfromme committed Oct 4, 2019
1 parent bbcf15d commit fec12ec
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions client/src/plugins/deployment-tool/DeploymentTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,25 @@ export default class DeploymentTool extends PureComponent {

// (3) Trigger deployment
// (3.1) Show deployment result (success or error)
const {
displayNotification
} = this.props;

try {
await this.deployWithDetails(tab, details);

this.props.displayNotification({ type: 'success', duration: 4000, title: 'Deployment succeeded' });
displayNotification({
type: 'success',
title: 'Deployment succeeded',
duration: 4000
});
} catch (error) {
this.props.displayNotification({ type: 'error', duration: 0, title: 'Deployment failed' });
displayNotification({
type: 'error',
title: 'Deployment failed',
content: 'See the log for further details.',
duration: 10000
});
}
}

Expand Down

0 comments on commit fec12ec

Please sign in to comment.